I have a dataset like this: ID Start date End date A 2015-01-01 2015-12-31 A 2016-01-01 2016-12-31 A 2017-01-03. 2017-12-31 B 2020-01-01 2020-12-31 B. 2022-01-01 2020-12-31 I want my final dataset to be ID Start date End date A 2015-01-01 2016-12-31 B 2020-01-01 2020-12-31 It should be the earliest begin date and latest end date from the continuous coverage. If there is a break in the next begin date then it should not consider the rows after that for that particular ID.
... View more