Giving the following table, I would like to discover the time interval where an overlap occurs between 2 or more users, and then record those times along with the users involved in the overlap. I have no clue of how I should approach this, so any help will be appreciated
Table1:
UserID StartDate EndDate
1 15:00 22:00
2 12:00 18:00
3 02:00 09:00
4 07:00 13:00
Expected Result:
StartDate EndDate Users
15:00 18:00 1,2
07:00 09:00 3,4
12:00 13:00 2,4