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: David Russell <dbruce_at_kreative.net>
Date: Thu, 27 May 1999 21:29:52 GMT
Message-ID: <374db93a.2720882@news>

and of course, take the count out and use rows...

;)avid

On Mon, 24 May 1999 14:26:07 -0500, "Doug Brown" <Doug.Brown_at_abbott.com> 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 Thu May 27 1999 - 16:29:52 CDT

Original text of this message

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