What DB are you using ?

I think you can use 
Select TOP N 
        in SQL server?

For Oracle you'd need something like

Select * from
        (select a.firstname, b.lastname, count(*) AS uploads
         FROM people a, uploads b
         WHERE a.person_id=b.person_id
         Group BY a.firstname, b.lastname
         Order BY uploads DESC)
Where rownum < 11

-----Original Message-----
From: Greg Creedon [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, August 21, 2001 3:19 PM
To: CF-Community
Subject: SQL Question


Pretty basic sql question, but, hey, I'm a pretty basic guy!

I have a table of people (people a) and a table of uploads with the person's
id in it (upload b). I'd like to display the top 10, say, uploaders. What do
I use for this??

Thanks for your help! Now, back to Star Trek!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to