Which SQL clause is used to filter groups after aggregation?
- WHERE
- HAVING
- GROUP BY
- ORDER BY
Answer: HAVING
HAVING clause filters results after GROUP BY aggregation, while WHERE filters rows before grouping. Example: SELECT dept, AVG(salary) FROM emp GROUP BY dept HAVING AVG(salary) > 50000. WHERE cannot be used with aggregate functions directly.