select id, qty from table order by qty desc use a max row set to 3
-----Original Message----- From: Jake McKee [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 27, 2002 2:07 PM To: CF-Talk Subject: Top Ten Results All, I have what will hopefully be an easy question. I have a DB with two columns ID and Qty. I am trying to figure out how to select the 3 ID (or however many) that have the largest Qty. For instance if this is my table: 1 43 2 6 3 55 4 645 5 2 6 78 7 32 8 30 9 45 10 90 then the results would return: 4 10 6 Please help! ______________________________________________________________________ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists