<cfquery name="myQuery"> SELECT * FROM TABLE ORDER BY year DESC </cfquery>
<cfoutput query="myQuery"> #CountryName#, #Value#, #Year#<br> </cfoutput> regards badal Tyagi HCL Perot Systems Noida, India -----Original Message----- From: Hugo Ahlenius [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 17, 2003 2:19 PM To: CF-Talk Subject: OT: SQL problem Hi, Anyone with some time for a little SQL question? I want to have a SELECT that gives me the highest values in a table The table looks like this: CountryName, Value, Year And the data something like: Sweden, 80, 1970 Sweden, 20, 1999 Denmark, 10, 1962 Denmark, 15, 1992 (etc) What I want to get from the query is the rows: Sweden, 20, 1999 Denmark, 15, 1992 Anyone? ------------------------------------------------------------- Hugo Ahlenius E-Mail: [EMAIL PROTECTED] Project Officer Phone: +46 8 230460 UNEP GRID-Arendal Fax: +46 8 230441 Stockholm Office Mobile: +46 733 467111 WWW: http://www.grida.no ------------------------------------------------------------- ########################################### This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange. For more information, connect to http://www.F-Secure.com/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

