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: Bob Badour <bbadour_at_golden.net>
Date: Thu, 13 Mar 2003 16:15:10 -0500
Message-ID: <f%6ca.75$hR2.8462398@mantis.golden.net>


"Mikito Harakiri" <mikharakiri_at_ywho.com> wrote in message news: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.

I think this interpretation more accurately reflects how most people intuitively perceive group by. Received on Thu Mar 13 2003 - 15:15:10 CST

Original text of this message

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