I have a table with groups of orders with potential start and end times and I\'m wondering about how to build a query to extract a distinct list of orders in a group, which