HAVING

HAVING Clause

The SQL HAVING clause is used in combination with the GROUP BY clause or an aggregate function.

The WHERE clause cannot be used with aggregate functions. The HAVING clause is applied to grouped records, but WHERE is applied to individual records. 

HAVING can also be used in combination with WHERE and ORDER BY clauses, for example:

So the new order for the clauses within an SQL Query is now: