Fixed GROUP BY and non-GROUP BY aggregations.