Which SQL clause is used to filter groups in a GROUP BY query?
-
A
WHERE
-
B
HAVING
Correct answer
-
C
ORDER BY
-
D
LIMIT
12 views
Explanation
HAVING filters groups after GROUP BY, while WHERE filters rows before grouping. Source: mcqsmind.com, SQL Joins, Q2.
Reference
Asked in: FPSC,CSS,NTS,PPSC,PMS
Doubts & discussion
Not sure why the answer is B? Ask here and get an explanation.
Ask a doubt about this MCQ