|
To limit the output based on the corresponding sum (or any other aggregate functions). For example, we might want to see only the stores with sales over $1,500.
Instead of using the WHERE clause in the SQL statement, though, we need to use the HAVING clause, which is reserved for aggregate functions.
The HAVING clause is placed near the end of the SQL statement.
SQL statement with the HAVING clause may or may not include the GROUP BY clause.
|