Having
HAVING expression
A HAVING clause is used in the same way as a WHERE clause except for one key difference. WHERE selects rows before the groups and aggregates are calculated, whereas HAVING selects rows after the groups and aggregates have been calculated.
In practice, there is no reason to use a HAVING clause unless the HAVING clause has an aggregate function (otherwise, it's equivalent to a WHERE clause). Unfortunately, certain databases (such as MySQL) don't support an aggregate in the HAVING clause. For those databases, HAVING and WHERE are the same.
 |