I wanted to a list of repeat guest count for consecutive stay dates. the back to back stays are considered as one stay. John stay from A - C should be as 1 stay and stay F should show as a new result as 2 since the stay date is not after the last checkout date. For D and E result should show as 1 as it is one stay with multiple dates.
Thanks,
stay | Name | Check in | Check out | Result/ stay |
A | John | 11/12/2019 | 13/12/2019 | 1 |
B | John | 13/12/2019 | 14/12/2019 | |
C | John | 14/12/2019 | 15/12/2019 | |
D | James | 28/10/2019 | 30/10/2019 | 1 |
E | James | 30/10/2019 | 01/11/2019 | |
F | John | 01/01/2020 | 03/01/2021 | 2 |
G | Martin | 30/10/2019 | 01/11/2019 | 1 |
H | Kim | 30/10/2019 | 01/11/2019 | 1 |
Thanks,