Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Top Value
One way: (since you might want top counts that are equal)
create table temp001 as
select bill_seq_no, count(mobile_num) howmany
from invoice
group by bill_seq_no;
select bill_seq_no, howmany
from temp001
where howmany =
(select max(howmany)
from temp001);
--