Supporting GROUP BY via group_by