HAVING clause:
The HAVING clause can be used along with GROUP BY clause in the SELECT statement to place condition on groups and can include aggregate functions on them.
For example to count the number of Male and Female students belonging to Chennai.
SELECT gender, COUNT(*) FROM Student GROUP BY Gender HAVING Place = ‘Chennai’;
The above output shows the number of Male and Female students in Chennai from the table student.