ID Order_ID statr_date end_date Product Sub_Product
746 001 08-Oct-2019 0:00:00 *16-Nov-2019 0:00:00* LPP Abc
746 002 10-Oct-2019 0:00:00 02-Sep-2020 0:00:00 LPP Abc
746 003 10-Oct-2019 0:00:00 11-Sep-2020 0:00:00 LPP Abc
746 004 10-Oct-2019 0:00:00 08-Jan-2021 0:00:00 LPP Abc
746 005 *16-Nov-2019 0:00:00* 17-Dec-2019 0:00:00 LPP Abc
In the above dataset i want to search for continuous dates, say from the first row having end date 16-nov-2019, look for a continuous date going by the start date and combine them. Such that the final output looks like:
ID Order_ID statr_date end_date Product Sub_Product
746 001 08-Oct-2019 0:00:00 17-Dec-2019 0:00:00 LPP Abc
746 002 10-Oct-2019 0:00:00 02-Sep-2020 0:00:00 LPP Abc
746 003 10-Oct-2019 0:00:00 11-Sep-2020 0:00:00 LPP Abc
746 004 10-Oct-2019 0:00:00 08-Jan-2021 0:00:00 LPP Abc
How can i go about doing that?