Utilisez la fonction ROW_NUMBER() et la clause PARTITION BY. Quelque chose comme ça :
SELECT Id, Name, Date FROM (
SELECT *, ROW_NUMBER() OVER (PARTITION BY Id ORDER BY Date desc) AS ROWNUM
FROM [MyTable]
) x WHERE ROWNUM = 1
Utilisez la fonction ROW_NUMBER() et la clause PARTITION BY. Quelque chose comme ça :
SELECT Id, Name, Date FROM (
SELECT *, ROW_NUMBER() OVER (PARTITION BY Id ORDER BY Date desc) AS ROWNUM
FROM [MyTable]
) x WHERE ROWNUM = 1