U kunt dit doen met de methode different-of-row number. Het verschil van row_number()
-- met bepaalde argumenten -- identificeert groepen. De rest is gewoon aggregatie:
select status, min(time), max(time)
from (select t.*,
(row_number() over (order by time) -
row_number() over (partition by status order by time)
) as grp
from mytable t
) t
group by status, grp;