Multiple choice technology databases

Which clause should you use to restrict group results

  1. WHERE

  2. HAVING

  3. RESTRICT

  4. ORDER BY

  5. GROUP BY

  6. Both A and B

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

HAVING is used to filter results AFTER aggregation (GROUP BY). WHERE filters rows BEFORE aggregation. For filtering on aggregate results (like COUNT, SUM, AVG), you must use HAVING, not WHERE.