--- 时间段 s,t
SELECT * FROM table WHERE
(start_time >= s and end_time <= t) -- 被包含了
or (end_time >= s and end_time <=t)
or (start_time >= s and start_time <=t)
or (start_time <= s and end_time >=t)
--- 时间段 s,t
SELECT * FROM table WHERE
(start_time >= s and end_time <= t) -- 被包含了
or (end_time >= s and end_time <=t)
or (start_time >= s and start_time <=t)
or (start_time <= s and end_time >=t)