Allow aggregates on queries using group_by

calling count(), avg() etc on queries which have groupings wraps the result set of the query in another query and then calls the aggregator on the result-set