Add GROUP BY support for selects.