Re: Why using "Group By"
From: Mikito Harakiri <mikharakiri_at_ywho.com>
Date: Thu, 13 Mar 2003 12:48:58 -0800
Message-ID: <Fe6ca.17$wV5.131_at_news.oracle.com>
Date: Thu, 13 Mar 2003 12:48:58 -0800
Message-ID: <Fe6ca.17$wV5.131_at_news.oracle.com>
"Mikito Harakiri" <mikharakiri_at_ywho.com> wrote in message
news:F86ca.16$wV5.40_at_news.oracle.com...
> This result might be consistent with C.J.Date proposal to treat
>
> select a, b, count(*) from sometable group by a
>
> as
>
> select distinct a, b,
> (select count(*) from sometable as it where it.a = ot.a)
> from sometable as ot
>
On the other hand, if we interpret "group-by" as
select a, b,
(select count(*) from sometable as it where it.a = ot.a) from (
select distinct a from sometable
) as ot
then, it should fail like oracle suggests. Received on Thu Mar 13 2003 - 21:48:58 CET