Having

The having clause specifies a search condition for a group or cluster. HAVING is often used with the GROUP BY statement to filter groups or clusters based on a certain condition.

NOTE: You cannot use column aliases in the HAVING statement because the HAVING clause is evaluated before the SELECT clause. Because column aliases specified in the SELECT clause cannot be used when evaluating the HAVING expression.