HAVINGis only for conditions involving aggregates used in conjunction with the
GROUP BYclause. eg.
WHEREis for any non-aggregage conditions
HAVINGapplies to groups.
WHEREapplies to rows.
select StudentName from students where Age > 20 select className, count(studentId) from classes group by className having count(studentId) > 10