From: | Chester Kustarz <chester(at)arbor(dot)net> |
---|---|
To: | David Fetter <david(at)fetter(dot)org> |
Cc: | Greg Donald <destiney(at)gmail(dot)com>, Jean-Luc Lachance <jllachan(at)sympatico(dot)ca>, pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: division by zero issue |
Date: | 2004-09-15 19:34:31 |
Message-ID: | Pine.BSO.4.44.0409151532080.26903-100000@detroit.arbor.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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."
From | Date | Subject | |
---|---|---|---|
Next Message | Anony Mous | 2004-09-15 19:52:17 | psql error - "unrecognizable command" V8.0.0 beta |
Previous Message | Chester Kustarz | 2004-09-15 19:26:30 | Re: division by zero issue |