The HAVING clause

 

The HAVING clause specifies which grouped records are displayed in a SELECT statement with a GROUP BY clause. Once GROUP BY combines records, HAVING displays any grouped records that satisfy the conditions of the HAVING clause. HAVING is similar to WHERE, which determines what records are selected; once records are grouped with GROUP BY, HAVING determines which records are displayed.