Assuming that the two values of ?
are the earliest and latest values in the day, I think you want:
where start < (?end) and end > (?start)
That is, there is an overlap when the start of one is before the end of the other, and vice versa.
In this answer (?end)
is intended to be the last timestamp of the day and (?start)
is intended to be the first.