Mega Code Archive

 
Categories / Oracle PLSQL Tutorial / Query Select
 

Using the HAVING Clause to Filter Groups of Rows

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 ...;