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: Many aggregates in one query

Re: Many aggregates in one query

From: serafim <serafim_at_nada.kth.se>
Date: Thu, 16 Aug 2001 17:44:36 +0200
Message-ID: <3B7BEA64.D1AAD849@nada.kth.se>

You cannot have an aggregate inside another aggregate.

create view v (wsid, rowcnt) as
select wsid, count(*) from test group by wsid;

select * from v where rowcnt =
(select min(rowcnt) from v)

will do the trick.
(there may be smarter methods)

/Serafim Received on Thu Aug 16 2001 - 10:44:36 CDT

Original text of this message

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