Jonathan, Try this out:
****** Untested code!!! ****** SELECT * FROM tblWhatever a INNER JOIN ( SELECT category,max(update_date) update_date FROM tblWhatever ) max_dates ON a.category = max_dates.category AND a.update_date = max_dates.update_date -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 27, 2003 3:06 PM To: CF-Talk Subject: Advanced SQL Query Question Hello, I'm working on a project where records will be added to a single table, and each record will be assigned to one of six categories (using a category column). Is there a way I can do a single query to pull the most recent record from each of the six categories? Or is my only option to do queries of queries on my CF template? Thanks, Jonathan ________________________________________________________ Jonathan Mauney Manager, Digital Media Properties / Web Application Developer 1110 WBT AM / 107.9 the LINK (WLNK-FM) / Jefferson-Pilot Radio Network Jefferson-Pilot Communications Co. One Julian Price Place Charlotte, North Carolina 28208 704.374.3862 [voice] 704.374.3884 [fax] [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> [email] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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 Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4