Gebruik de ROW_NUMBER()-functie en PARTITION BY-clausule. Zoiets als dit:
SELECT Id, Name, Date FROM (
SELECT *, ROW_NUMBER() OVER (PARTITION BY Id ORDER BY Date desc) AS ROWNUM
FROM [MyTable]
) x WHERE ROWNUM = 1
Gebruik de ROW_NUMBER()-functie en PARTITION BY-clausule. Zoiets als dit:
SELECT Id, Name, Date FROM (
SELECT *, ROW_NUMBER() OVER (PARTITION BY Id ORDER BY Date desc) AS ROWNUM
FROM [MyTable]
) x WHERE ROWNUM = 1