Having clause is used to further filter those groups of records which will be generated through group by clause.
For example:
Select max(marks) from student group by classes having classes in (10,12);
Above given query will arrange records in groups according to the classes. Further filtering on these groups will happen through having clause, which will finally display the highest marks from classes 10 and 12.