How can we find departments with high average salaries?
HAVING filters groups based on aggregate statistical outcomes such as AVG(), SUM(), or MAX().
Identifying high-compensation divisions, flagging high-error service clusters.
SELECT department, AVG(salary) AS average_salary
FROM employees
GROUP BY department
HAVING AVG(salary) > 90000;Practice typing production-grade SQL code for HAVING with AVG.