Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Top n in sql
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 - 14:26:07 CDT
![]() |
![]() |