Having clause, used to filter aggregations

The test needs to be updated when aggregations become a better supported concept, related to my function change.

SQL Having Clause should be supported by all SQL DB.