| Dates |
|---|
| 2021-01-01 |
| 2021-01-02 |
| 2021-01-03 |
| 2021-01-10 |
| 2021-01-11 |
| 2021-01-12 |
| 2021-01-15 |
Expected output:
| Dates | Counter |
|---|---|
| 2021-01-01 | 1 |
| 2021-01-02 | 2 |
| 2021-01-03 | 3 |
| 2021-01-10 | 1 |
| 2021-01-11 | 2 |
| 2021-01-12 | 3 |
| 2021-01-15 | 1 |
Any idea how to achieve this ? I do know how to find min, max and count of the consecutive dates but need a counter that resets every time there is a gap in dates