I\'m migrating from MySQL to Postgres. In MySQL I can use
select sum(clicks) c from table where event_date >= \'1999-01-01\' group by keyword_id having
You can use WITH Queries (Common Table Expressions) to achieve the results like below
WITH t AS ( SELECT sum(clicks) c FROM TABLE WHERE event_date >= '1999-01-01' GROUP BY keyword_id ) SELECT c FROM t WHERE c > 10