Which SQL clause filters groups after aggregation has been applied?
-
A
ORDER BY
-
B
HAVING
Correct answer
-
C
GROUP BY
-
D
WHERE
16 views
Explanation
HAVING filters grouped results, for example HAVING COUNT(*) > 5. WHERE filters individual rows before grouping and cannot use aggregate functions.
Reference
Asked in: GATE CS, NTS, PPSC, FPSC
Doubts & discussion
Not sure why the answer is B? Ask here and get an explanation.
Ask a doubt about this MCQ