By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
User_ID | StartDate | EndDate | LAG_Result |
---|---|---|---|
1 | 01/01/2019 00:00:00 | 28/02/2019 00:00:00 | null |
2 | 01/02/2019 00:00:00 | 01/02/2019 00:00:00 | null |
3 | 27/02/2019 00:00:00 | 28/02/2019 00:00:00 | null |
4 | 04/04/2019 00:00:00 | 01/09/2019 00:00:00 | null |
5 | 07/08/2019 00:00:00 | 07/08/2019 00:00:00 | 01/02/2019 00:00:00 |
6 | 27/08/2019 00:00:00 | 27/08/2019 00:00:00 | 07/08/2019 00:00:00 |