Grouping Aggregations

GROUP BY splits the rows into groups and runs the aggregates once per group. Every column in the SELECT that isn't aggregated must be in the GROUP BY.

Updated

Cheat sheet: Grouping Aggregations
Category
SQL
Level
Journeyman
Tags
group by, sql, t-sql