By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
4 rows affected
| id | d1 | d2 |
|---|---|---|
| A | 2023-01-01 | 2023-01-31 |
| A | 2023-10-01 | 2023-10-31 |
| B | 2023-01-01 | 2023-02-28 |
4 rows affected
| id | d1 | d2 |
|---|---|---|
| A | 2023-01-01 | 2023-01-31 |
| A | 2023-10-01 | 2023-10-31 |
| B | 2023-01-01 | 2023-02-28 |