Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: Why using "Group By"

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@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 - 14:48:58 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US