CS FundamentalsEasyWipro · Cognizant pattern

Which SQL clause filters groups AFTER aggregation?

  1. A. HAVING
  2. B. WHERE
  3. C. GROUP BY
  4. D. ORDER BY

Correct answer: A. HAVING

WHERE filters individual rows before grouping and cannot use aggregates; HAVING filters the groups formed by GROUP BY and can test COUNT, SUM, AVG and so on.

More DBMS and SQL questions

Exams that ask this topic