GROUP BY

Transact-SQL Reference

Transact-SQL Reference

GROUP BY

Divides a table into groups. Groups can consist of column names or results or computed columns. For more information, see SELECT.