Both WHERE and HAVING clauses are used to
filter the data. But WHERE Clause can't be used with Aggregate
Functions, so HAVING Clause is introduced. The HAVING Clause is used to
filter data (returned by GROUP BY Statement) after GROUP BY Statement
and The WHERE Clause is used to filter data (returned by SELECT
Statement) before GROUP BY Statement.
* The use of WHERE Clause after GROUP BY Statement is restricted.
* The use of HAVING Clause before GROUP BY Statement is restricted.