I have dataset in the form DATA details;
input id doj$;
datalines;
1 11/06/2020
1 18/07/2020
1 18/07/2020
2 12/06/2020
2 19/06/2020
3 13/06/2020
4 14/06/2020
5 15/06/2020
5 15/06/2020
;
Run;
(this dataset is sorted by ID and doj). I would like an output table that gives: ID doj 1 18/07/2020 1 18/07/2020 2 19/06/2020 3 13/06/2020 4 14/06/2020 5 15/06/2020 5 15/06/2020 It looks at each unique ID, and then takes the latest one based on "doj" and takes multiple records if the "latest" is repeated. This is a simple example, but there can be more columns in the source table, and also many more dates for each id.
... View more