Jump to content

Selecting The Last Entry in a Log Table for each user


cooldude832

Recommended Posts

try

SELECT l.LogID, l.Date_Entered, l.UserID, l.UnderwriterID, l.Message
FROM log l
INNER JOIN (
    SELECT logID, MAX(Date_Entered) as Date_Entered
    FROM log GROUP BY logID
    ) as X USING (logID, Date_Entered)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.