Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> SQL Question

SQL Question

From: Chunli Yao <yaoc_at_ecs.ecs.csus.edu>
Date: 1997/09/25
Message-ID: <60ebu8$k3d@csusac.ecs.csus.edu>#1/1

sales table with the following columns:
ord_id, sales_rep_id, total...

I can find the total sale amount for each sales rep and ordered by total sale amount by using the following sql code:

select sales_rep_id, sum(total)
from sales
group by sales_rep_id
order by sum(total_ desc

but how to find the top 3 sales reps? I know rownum doesn't help here.

Thanks a lot!

cy Received on Thu Sep 25 1997 - 00:00:00 CDT

Original text of this message

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