By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
id | start | end | cancelled | prev_cancelled | num_days_since_cancel |
---|---|---|---|---|---|
1 | 2021-02-01 00:00:00 | 2022-01-31 00:00:00 | null | 2021-01-10 00:00:00 | 22 |
3 | 2020-07-10 00:00:00 | 2021-01-09 00:00:00 | 2021-01-31 00:00:00 | 2020-07-01 00:00:00 | 9 |
3 | 2021-02-02 00:00:00 | 2021-08-01 00:00:00 | null | 2021-01-31 00:00:00 | 2 |
4 | 2020-02-22 00:00:00 | 2021-02-22 00:00:00 | null | 2020-01-03 00:00:00 | 50 |