How do I transform this data
| Date1 | Date2 | ID |
|---|---|---|
| 2021-01-01 | 2021-01-04 | 1 |
| 2021-01-05 | 2021-01-25 | 2 |
into this
| Date | ID |
|---|---|
| 2021-01-01 | 1 |
| 2021-01-02 | 1 |
| 2021-01-03 | 1 |
| 2021-01-04 | 1 |
| 2021-01-05 | 2 |
| 2021-01-06 | 2 |
| ... | ... |
| 2021-01-24 | 2 |
| 2021-01-25 | 2 |
I'm working with Postgres and my intuition is telling me to use the generate_series function within Postgres but I'm not sure of the implementation. Any help appreciated.