Axel Jensen wrote:
> I'm trying to create a "most recently updated" list of tracks that we
> update, and track our bugs, and feature requests with.  
....
> 
> SELECT      DISTINCT    e.createdByUserID,i.itemID, i.title, e.datecreated
> FROM        events e  
> JOIN        v_items i ON e.itemID = i.itemID
> WHERE       e.createdbyuserid = 92 
> ORDER BY    e.datecreated desc
> 

I think you want something more like:

SELECT      e.createdByUserID,i.itemID, i.title, MAX(e.datecreated) AS 
latestdate
FROM        events e
JOIN        v_items i ON e.itemID = i.itemID
WHERE       e.createdbyuserid = 92
GROUP BY    e.createdByUserID,i.itemID, i.title
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:260664
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to