The HAVING clause comes after the GROUP BY Clause and places conditions on which groups needs to be retrieved by the query. The conditions are similar to those of the WHERE Clause, but unlike the WHERE clause can accept conditions on aggregate functions ( AVG, MAX, MIN, SUM, COUNT). See the WHERE Clause section on how to add a condition.