HAVING clause in SQL

HAVING clause is used to filter out records based on aggregated values. In the respect of aggregation, WHERE can’t be used. It does not work. Therefore, while applying condition where we are calculating fields data, we will use HAVING. See below example-