Adding support for filters in simple group by query