Added Code Climate.
Fix tests where Postgres requires non-aliased column in HAVING clause.