That's so simple compared to the things I'd been trying! It works perfectly and as Brad suggested I can easily get counts as well which is a major bonus.
Many thanks Jim. Mike, I tried your suggestion but it didn't seem to produce the desired result. I'll tinker with it though to see what I can learn. Teddy, I'm not too familiar with views so my attempt produced incorrect results. As above though, I'll play with it to see what I can learn. Thanks for the help, its most appreciated. ----- Original Message ----- From: "Jim Wright" <[EMAIL PROTECTED]> To: "CF-Talk" <cf-talk@houseoffusion.com> Sent: Wednesday, October 18, 2006 4:05 PM Subject: Re: Select distinct on multiple columns Maybe something like... SELECT TOP 10 search_criteria, search_page, max(search_datetime) AS latestdate FROM tblSearches GROUP BY search_criteria, search_page ORDER BY latestdate DESC ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:257219 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4