Verwenden Sie die ROW_NUMBER()-Funktion und PARTITION BY-Klausel. Etwa so:
SELECT Id, Name, Date FROM (
SELECT *, ROW_NUMBER() OVER (PARTITION BY Id ORDER BY Date desc) AS ROWNUM
FROM [MyTable]
) x WHERE ROWNUM = 1
Verwenden Sie die ROW_NUMBER()-Funktion und PARTITION BY-Klausel. Etwa so:
SELECT Id, Name, Date FROM (
SELECT *, ROW_NUMBER() OVER (PARTITION BY Id ORDER BY Date desc) AS ROWNUM
FROM [MyTable]
) x WHERE ROWNUM = 1