Actually, I didn't.  I responded to him.

-----Original Message-----
From: Rob Keniger [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 16, 2000 10:01 PM
To: CF-Talk
Subject: Re: returning top 10


on 10/17/00 11:15 AM, Shawnea Carter at [EMAIL PROTECTED] wrote:

> How do you write a SQL statement that will return the top 10 of something
> (eg. top 10 salaries, top ten students by GPA, top ten populated counties,
> etc.)?

Wouldn't you just do:

<cfquery name="gettopstudents" datasource="#dsn#" maxrows=10>
select studentname from students
order by GPA desc
</cfquery>

--

Rob Keniger

big bang solutions

<mailto:[EMAIL PROTECTED]>
<http://www.bigbang.net.au>

----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to