Hello again Janet, thank you for your help on this. It suare has had me stumped.
So, like this? SELECT dbo.tblSubscribers.SID, dbo.tblSubscribers.Username, max(dbo.tblUserTransactionLog.Processed) AS LastTransaction FROM dbo.tblSubscribers, dbo.tblUserTransactionLog WHERE dbo.tblSubscribers.SID = dbo.tblUserTransactionLog.SID AND (dbo.tblUserTransactionLog.Processed >= CONVERT(datetime, '08/01/2007', 101)) AND (dbo.tblUserTransactionLog.Processed <= CONVERT(datetime, '08/07/2007', 101)) GROUP BY dbo.tblSubscribers.SID, dbo.tblSubscribers.Username Thanks, CWB > > 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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Download the latest ColdFusion 8 utilities including Report Builder, plug-ins for Eclipse and Dreamweaver updates. http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285754 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

