Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Whether this with/withOut nested Agg function SQL behavier is documented.

Aketi JyuuzouDec 15 2010 — edited Dec 24 2010
from this thread 2146662
create table testT(Val) as
select 1 from dual union all
select 1 from dual union all
select 5 from dual union all
select 7 from dual union all
select 7 from dual union all
select 7 from dual union all
select 9 from dual;

select count(*) as eachCnt
  from testT
group by Val order by 1;

eachCnt
-------
      1
      1
      2
      3

select count(*) as groupCount,
max(count(*)) as modeCnt
  from testT
group by Val order by 1;

groupCount  modeCnt
----------  -------
         4        3
count(*) returns different values !!!
My question is whether this with/withOut nested Agg function SQL behavier is documented or not.
If it is documented Please teach URL.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 19 2011
Added on Dec 15 2010
4 comments
346 views