Saya pikir Anda membutuhkan ini:
select t1.`timeto`, min(t2.`timefrom`)
from
yourtable t1 inner join yourtable t2
on t1.`timeto`<t2.`timefrom`
group by t1.`timeto`
having
not exists (select null from yourtable t3
where t1.`timeto`<t3.`timeto`
and min(t2.`timefrom`)>t3.`timefrom`)
(ini hanya akan berfungsi jika interval tidak tumpang tindih)