I'm trying to take a column of dates and create a new table that includes the start and end date of each continuous date range. For example (date format being mm/dd/yyyy):
| id | date |
|---|---|
| 2 | 01/02/2022 |
| 5 | 01/03/2022 |
| 5 | 01/04/2022 |
| 5 | 01/05/2022 |
| 6 | 01/02/2022 |
| 6 | 01/04/2022 |
| 6 | 01/05/2022 |
would create the following table:
| id | start | end |
|---|---|---|
| 2 | 01/02/2022 | 01/02/2022 |
| 5 | 01/03/2022 | 01/01/2022 |
| 6 | 01/02/2022 | 01/02/2022 |
| 6 | 01/04/2022 | 01/05/2022 |
