| 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: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
![]() |
![]() |