On Wed, 15 Sep 2004, David Fetter wrote:
> I know it's a little weird to have WHERE for non-aggregate and HAVING
> for aggregates, but that's the SQL standard...
the WHERE clause strips rows before grouping. the HAVING clause operates
after grouping. so it's not so much aggregate vs. non-aggregate as it is
about order of operations.
http://philip.greenspun.com/sql/complex-queries.html
"The WHERE clause restricts which rows are returned. The HAVING clause operates analogously but on groups of rows."