My goal is to have a single row by id.
Now I have multiple rows like this for each one
For example user number 001 has this:
| Ini Date | End Date | Qnty |
|---|---|---|
| 2023-01-02 | 2023-01-02 | 1.0000 |
| 2023-01-03 | 2023-01-03 | 1.0000 |
| 2023-01-04 | 2023-01-04 | 1.0000 |
| 2023-01-05 | 2023-01-05 | 1.0000 |
| 2023-01-06 | 2023-01-06 | 1.0000 |
My goal is to when the Ini.Date of the following row is the next day it update the end date and sums the Qnt.
My expected ouput would be:
| Ini Date | End Date | Qnty |
|---|---|---|
| 2023-01-02 | 2023-01-06 | 5.0000 |
Can anyone please point me in the right direction ?