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_at_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 - 17:44:36 CEST

Original text of this message