QuizIntermediate

Purpose of GROUP BY to collapse rows into groups

GROUP BY collapses rows that share the same values into summary rows so aggregate functions can compute one result per group.

What is the primary purpose of the GROUP BY clause in SQL?