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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Top n in sql

Re: Top n in sql

From: Oracle Developer <rkamene_at_easynet.co.uk>
Date: Mon, 24 May 1999 22:04:00 +0100
Message-ID: <3749BEC0.75E8385A@easynet.co.uk>


Hello,
Go to this location and all your problems will be solved. http://www.arrowsent.com/oratip/tip38.htm Good luck.
RNK. Doug Brown wrote:
>
> I want to return the top 5 users of yesterdays internet. I have a log table
> that has userid and date visited.
>
> select count(*)
> from logtable
> group by userid
> order by count(*) desc
>
> but I want to stop after the top five are returned.
>
> Anyone know this one?
>
> Thanks
> Doug Brown
Received on Mon May 24 1999 - 16:04:00 CDT

Original text of this message

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