| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Why using "Group By"
"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
![]() |
![]() |