HAVING (UpdatedDate = MAX(UpdatedDate))
Getting 1 ID for each of the latest Updated records:
SELECT ID, UpdatedDate
FROM SomeTable
GROUP BY ID, UpdatedDate
HAVING (UpdatedDate = MAX(UpdatedDate))
SELECT ID, UpdatedDate
FROM SomeTable
GROUP BY ID, UpdatedDate
HAVING (UpdatedDate = MAX(UpdatedDate))
0 Comments:
Post a Comment
<< Home