Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to count & put a limit to the output at the same time ??
select NAME, COUNT FROM (
select NAME, count(*) as COUNT from A
group by NAME
order by 2 desc)
where ROWNUM <6;
should do it.
Regards,
Örjan Received on Sat Jun 05 1999 - 16:36:22 CDT