I require to display the startTime of the min timeSlotID and the endTime of the max timeSlotID where dayofweek=1. I want the slotuion using joins but not by creating any temporary tables. Consider that there are a lot of records for dayofweek = 1.
The output that I require is like the following:---
select 'MIN' as resulttype
, startTime as thetime
by timeSlotID desc