Beginner
Database Management Systems
Q15 / 100
What does GROUP BY do in SQL?
Correct! Well done.
Incorrect.
The correct answer is B) Groups rows with the same values in specified columns, used with aggregate functions like COUNT, SUM, AVG
B
Correct Answer
Groups rows with the same values in specified columns, used with aggregate functions like COUNT, SUM, AVG
Explanation
GROUP BY creates groups of rows with identical values. Aggregate functions compute per-group. SELECT dept, COUNT(*) FROM employees GROUP BY dept counts employees per department.
Progress
15/100