> I should have mentioned that I need to get only the most recent > transaction for each user within the given time-frame. That's why I > am using max(). Using this aggregate function, I think, requires I > use "having," no?.
No, if I'm understanding correctly its not required here. The WHERE clause restricts the results to the given time frame and the aggregate + the GROUP BY gives you the max (per user) Janet ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Check out the new features and enhancements in the latest product release - download the "What's New PDF" now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285741 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4