By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
| version |
|---|
| PostgreSQL 14.1 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-4), 64-bit |
3 rows affected
1 rows affected
1 rows affected
| id | start_date | end_date | date |
|---|---|---|---|
| 100 | 2022-01-01 | 2022-04-26 | 2022-01-31 |
| 100 | 2022-01-01 | 2022-04-26 | 2022-02-28 |
| 100 | 2022-01-01 | 2022-04-26 | 2022-03-31 |
| 100 | 2022-01-01 | 2022-04-26 | 2022-04-30 |
| 102 | 2022-01-01 | 2022-02-27 | 2022-01-31 |
| 102 | 2022-01-01 | 2022-02-27 | 2022-02-28 |
| 101 | 2022-04-20 | null | 2022-04-30 |
| 101 | 2022-04-20 | null | 2022-05-31 |
| 104 | 2022-01-20 | null | 2022-01-31 |
| 104 | 2022-01-20 | null | 2022-02-28 |
| 1010 | 2022-09-20 | null | 2022-09-30 |
| 1010 | 2022-09-20 | null | 2022-10-31 |