I have a set of data with ID's and dates.
For each overlapping date, I would like to replace the overlap with the next row (ie. combine the overlapping dates).
NB: There are ID's that have only one row and therefore do not need to be altered. There are those that don't have an overlap and need to remain as they are (ie. with two rows).
Example data:
ID Start End
1 2007-02-01 2007-03-03
1 2007-03-01 2007-03-31
1 2007-09-01 2008-07-31
6 2011-02-05 2011-03-12
5 2012-11-16 2012-12-26
4 2015-01-03 2015-02-14
3 2008-08-02 2008-09-11
7 2010-09-22 2010-10-22
7 2010-09-24 2010-10-24
7 2010-09-26 2010-10-26
7 2010-09-28 2010-10-28
ID Start End
1 2007-02-01 2007-03-31
1 2007-09-01 2008-07-31
6 2011-02-05 2011-03-12
5 2012-11-16 2012-12-26
4 2015-01-03 2015-02-14
3 2008-08-02 2008-09-11
7 2010-09-22 2010-10-28