I have a list of objects, there are multiple objects in list and every object contain StartTime and EndTime, for example:
StartTime: 09:00 EndTime: 10:00
StartTime: 09:30 EndTime: 10:15
StartTime: 10:00 EndTime: 10:30
StartTime: 11:00 EndTime: 11:30
StartTime: 11:45 EndTime: 13:00
StartTime: 12:45 EndTime: 14:00
In the above example there are three groups of time intervals with and without overlapping:
1) StartTime: 09:00 EndTime: 10:30
2) StartTime: 11:00 EndTime: 11:30
3) StartTime: 11:45 EndTime: 14:00
Please suggest how can I modify my query to get the results like above example, any help will be highly appreciated.