Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Top Value
Try select bill_seq_no, count(mobile_num)
from invoice where bill_seq_no=(select min(bill_seq_no) from invoice) group by bill_seq_no;
MG> I have a statement
SQL>> select bill_seq_no, count(mobile_num)
MG> 2 from invoice
MG> 3 group by bill_seq_no;
MG> BILL_SEQ_N COUNT(MOBILE_NUM) MG> ---------- ----------------- MG> MD0 14 MG> MD1 5 MG> MD2 1
MG> How can i rewrite the statement so it only returns the 1st line (MD0, 14)? MG> Rownum won't help.
MG> M Received on Thu Jun 03 1999 - 02:43:35 CDT
![]() |
![]() |