Re: Why using "Group By"

From: Jonathan Leffler <>
Date: Tue, 18 Mar 2003 05:16:38 GMT
Message-ID: <>

Mikito Harakiri wrote:
> "oferbu" <> wrote:

>>So if I sum all the replies by now, there is no really any need for
>>the extra information added by the clause "Group by YYY, ZZZ" when the
>>SQL already contains an aggregate function, right?

> Correct: nobody, suggested a reason convincing enough to justify "group by".
> Even in complicated examples like this

IIRC, didn't Chris Date have a sequence of articles with the heading GBH - Grievous Bodily Harm - in DBP&D in the last months of his "According to Date" series. The thesis was roughly that both GROUP BY and HAVING (the GB and H in GH) were unnecessary, even harmful.

> and, therefore, "group by" is redundant.

I believe that this is correct - except that standard SQL requires it.

Jonathan Leffler                   #include <disclaimer.h>
Guardian of DBD::Informix v2003.04 --
Received on Tue Mar 18 2003 - 06:16:38 CET

Original text of this message