Can I find the last record entered in a "group" of records

C

Carol Shepherd

I have a multi-group of records and would like to find the "last" entered in
each group based on a date.
 
O

Ofer

Try something like

SELECT [M1].*
FROM [TableName] AS M1
WHERE M1.[DateFieldName] In (SELECT Top 1 M2.[DateFieldName]
FROM [TableName] as M2
WHERE M2.[group] =M1.[group]
ORDER BY M2.[DateFieldName] Desc)
 
Top