Utilizzare la funzione ROW_NUMBER() e clausola PARTITION BY. Qualcosa del genere:
SELECT Id, Name, Date FROM (
SELECT *, ROW_NUMBER() OVER (PARTITION BY Id ORDER BY Date desc) AS ROWNUM
FROM [MyTable]
) x WHERE ROWNUM = 1
Utilizzare la funzione ROW_NUMBER() e clausola PARTITION BY. Qualcosa del genere:
SELECT Id, Name, Date FROM (
SELECT *, ROW_NUMBER() OVER (PARTITION BY Id ORDER BY Date desc) AS ROWNUM
FROM [MyTable]
) x WHERE ROWNUM = 1