By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
RoomTypeId | EndDateSeq1 | StartDateSeq2 | GAP |
---|---|---|---|
39 | 04/08/2019 00:00:00 | 05/08/2019 00:00:00 | 1 |
39 | 08/08/2019 00:00:00 | null | null |
40 | 08/08/2019 00:00:00 | null | null |
41 | 03/08/2019 00:00:00 | null | null |
42 | 03/08/2019 00:00:00 | 04/08/2019 00:00:00 | 1 |
42 | 05/08/2019 00:00:00 | null | null |
43 | 01/08/2019 00:00:00 | 15/08/2019 00:00:00 | 14 |
43 | 16/08/2019 00:00:00 | 29/08/2019 00:00:00 | 13 |
43 | 30/08/2019 00:00:00 | null | null |
45 | 05/08/2019 00:00:00 | 08/08/2019 00:00:00 | 3 |
45 | 06/08/2019 00:00:00 | 08/08/2019 00:00:00 | 2 |
45 | 10/08/2019 00:00:00 | 17/08/2019 00:00:00 | 7 |
45 | 19/08/2019 00:00:00 | null | null |
46 | 04/08/2019 00:00:00 | 05/08/2019 00:00:00 | 1 |
46 | 05/08/2019 00:00:00 | null | null |
48 | 18/08/2019 00:00:00 | null | null |
49 | 10/08/2019 00:00:00 | null | null |
49 | 11/08/2019 00:00:00 | null | null |
Warning: Null value is eliminated by an aggregate or other SET operation.