Implement feedback from Ansii

Ensure aggregates can only be aggregated in subquery

get_cols replaced by get_group_by_cols

Fix annotation typo