;WITH x AS
(
SELECT ID, NAME, [DATE],
rn = ROW_NUMBER() OVER
(PARTITION BY NAME ORDER BY [DATE] DESC)
FROM @TESTABLE
)
SELECT ID, NAME, [DATE] FROM x WHERE rn = 1
ORDER BY [DATE] DESC;
[DATE]
. जैसे आरक्षित शब्दों (और अस्पष्ट कॉलम नाम) से बचने का प्रयास करें ...