__________group the rows together that contains the same value in a specified column.
__________group the rows together that contains the same value in a specified column.
Solution
The GROUP BY clause in SQL groups together the rows that have the same value in a specified column. Aggregate functions such as SUM, COUNT or AVG are then applied to each group, giving one result row per group.
Example: gives one row per department with its employee count.
Option 1: an aggregate function calculates a single value (such as SUM or MAX) from a set of rows. It works on groups but does not form them.
Option 3: ORDER BY only sorts the result rows. It does not combine rows with equal values.
Option 4: a scalar function works on a single value and returns a single value (such as UPPER or LEN), so it does not group rows.
Related questions:
2026: 26 May Shift 1
2025: 30 May Shift 2
2026: 23 May Shift 2
2025: 3 June Shift 2
2025: 20 May Shift 1