Re: GROUP BY

From: Lennart <erik.lennart.jonsson_at_gmail.com>
Date: Sun, 20 May 2007 15:05:03 +0200
Message-ID: <f2ph1v$u15$1_at_registered.motzarella.org>


V.J. Kumar wrote:
[...]

>> 
>> T431, "Extended grouping capabilities"
>> 
>> I believe this is the same feature as where group by grouping sets, 
>> rollup and cube are defined.

>
> What have 'extended grouping capabilities' got to do with the claim that
> the simple 'group by' miraculously creates a tuple out of nothing ?

I dont have sql99 at hand so I can not verify it, but I would not concider it particulary strange if grouping by an emtpy set where part of "Extended grouping capabilities"

> It
> does not, either in the implementations I referred to or in the '92
> standard. Neither does it in '99, btw ! Also 'select 1 from t1 group by
> grouping sets ()' is syntactically incorrect in both implementations.
>

Yes of course, you need a set of groups:

select 1 from t1 group by grouping sets (())

which I imagine is the same as:

select 1 from t1 group by ()

/Lennart Received on Sun May 20 2007 - 15:05:03 CEST

Original text of this message