In SQL, the GROUP BY clause is used to:
-
A
filter individual rows by a condition
-
B
sort the result set in ascending order
-
C
aggregate rows that share a value into groups
Correct answer
-
D
join two tables on a common key
Correct answer
C. aggregate rows that share a value into groups
15 views
Explanation
GROUP BY forms groups of rows with the same value, usually combined with aggregate functions.
Reference
Asked in: NTS, PPSC IT, Interviews
Doubts & discussion
Not sure why the answer is C? Ask here and get an explanation.
Ask a doubt about this MCQ