group by is useful with other aggregates like sum, max, and so on.