I have a table containing multiple time series, each one is associated with a given ID.
Something like this
+--------------------------------------+
| ID | start | end | value |
+--------------------------------------+
| a | 01/01/2018 | 03/01/2018 | 5 |
| a | 03/01/2018 | 04/01/2018 | 6 |
| a | 04/01/2018 | 06/01/2018 | 7 |
| b | 01/01/2018 | 04/01/2018 | 3 |
| b | 04/01/2018 | 06/01/2018 | 4 |
+--------------------------------------+
We see that the time series are define by irregular intervals. I would like to "expand" each time series so there is a row per day in the series.
Like this
+--------------------------------------+
| ID | start | end | value |
+--------------------------------------+
| a | 01/01/2018 | 02/01/2018 | 5 |
| a | 02/01/2018 | 03/01/2018 | 5 |
| a | 03/01/2018 | 04/01/2018 | 6 |
| a | 04/01/2018 | 05/01/2018 | 7 |
| a | 05/01/2018 | 06/01/2018 | 7 |
| b | 01/01/2018 | 02/01/2018 | 3 |
| b | 02/01/2018 | 03/01/2018 | 3 |
| b | 03/01/2018 | 04/01/2018 | 3 |
| b | 04/01/2018 | 05/01/2018 | 4 |
| b | 05/01/2018 | 06/01/2018 | 4 |
+--------------------------------------+
Is getting the latter table from the former possible in SQL, if so can you please point me in the right direction?
Note: Each time series is contiguous and there are no overlapping intervals.