ID Date
13 2021-03-24 00:00:00.000
13 2021-03-23 00:00:00.000
13 2014-12-27 00:00:00.000
52 2021-03-17 00:00:00.000
52 2020-06-21 00:00:00.000
120 2021-04-21 00:00:00.000
141 2021-05-04 00:00:00.000
select distinct ID, [Date]
from Table
group by Id, [Date]
order by Id, [Date] desc
But my intention is to get something like this, only the TOP value for each ID, having the [Date] descending:
ID Date
13 2021-03-24 00:00:00.000
52 2021-03-17 00:00:00.000
120 2021-04-21 00:00:00.000
141 2021-05-04 00:00:00.000