By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
9 rows affected
Employee | Leave_Date | rn | counter |
---|---|---|---|
John | 2020-01-25 | 1 | 1 |
John | 2020-01-26 | 2 | 2 |
John | 2020-01-27 | 3 | 3 |
John | 2020-01-28 | 4 | 4 |
John | 2020-03-15 | 5 | 1 |
John | 2020-03-16 | 6 | 2 |
Mary | 2020-02-12 | 1 | 1 |
Mary | 2020-02-13 | 2 | 2 |
Mary | 2020-02-20 | 3 | 1 |