разница между тем, где и имея пункт
The difference between the having and
where clause in SQL is that the where
clause cannot be used with aggregates,
but the having clause can.
Obedient Ocelot