Using the HAVING Clause to Filter Groups of Rows : HAVING « Query Select « Oracle PL/SQL Tutorial






You use the HAVING clause to filter groups of rows.

GROUP BY can be used without HAVING.

But HAVING must be used in conjunction with GROUP BY.

You place the HAVING clause after your GROUP BY clause:

SELECT ...
FROM ...
WHERE
GROUP BY ...
HAVING ...
ORDER BY ...;








2.6.HAVING
2.6.1.Using the HAVING Clause to Filter Groups of Rows
2.6.2.Use Having
2.6.3.Using the WHERE, GROUP BY, and HAVING Clauses Together
2.6.4.Adds an ORDER BY clause
2.6.5.In what city do we have the most employees?
2.6.6.Display department number and its employee count if it has more than 4 employees
2.6.7.List department who has more than 4 employee born after 1960
2.6.8.List the employees whose salary is higher than the average salary with self join