Mar 15 2024 08:15 PM
This is my data set, how to grouping by next occurance of Null
Start_Date End_Date
2020-01-15 NULL
2020-01-15 2020-01-15
2020-01-17 2020-01-17
2020-01-21 2020-01-17
2020-01-22 2020-01-21
2020-01-23 2020-01-22
2020-01-24 2020-01-23
2020-01-24 2020-01-24 ---> This End_Date will be End_Date for the Start_Date = 2020-01-15
2020-12-28 NULL
2020-12-28 2020-12-28
2020-12-28 2020-12-28
2020-12-28 2020-12-28
2020-12-28 2020-12-28
2020-12-28 2020-12-28
2020-12-28 2020-12-28
2021-01-12 2021-01-11---> This End_Date will be End_Date for the Start_Date =2020-12-28
2021-09-22 NULL
2021-09-22 2021-09-22
2021-09-29 2021-09-22
2021-09-29 2021-09-29
2021-11-12 2021-11-12 ---> This End_Date will be End_Date for the Start_Date =2021-09-22
Final Result result will be like this
2020-01-15 2020-01-24
2020-12-28 2021-01-11
2021-09-22 2021-11-12