-- Тестовая таблица, для тестов "на коленке"
with t as (select 1 id, TO_TIMESTAMP('2023.01.01 00:00:00', 'YYYY.MM.DD HH24:MI:SS') as timestamp union
select 2, TO_TIMESTAMP('2023.01.01 00:01:00', 'YYYY.MM.DD HH24:MI:SS') union
select 3, TO_TIMESTAMP('2023.01.01 00:02:00', 'YYYY.MM.DD HH24:MI:SS') union
select 4, TO_TIMESTAMP('2023.01.01 00:03:00', 'YYYY.MM.DD HH24:MI:SS') union
select 5, TO_TIMESTAMP('2023.01.01 00:05:00', 'YYYY.MM.DD HH24:MI:SS') union
select 6, TO_TIMESTAMP('2023.01.01 00:06:00', 'YYYY.MM.DD HH24:MI:SS') union
select 7, TO_TIMESTAMP('2023.01.01 00:07:00', 'YYYY.MM.DD HH24:MI:SS') union
select 8, TO_TIMESTAMP('2023.01.01 00:10:00', 'YYYY.MM.DD HH24:MI:SS') )
-- основной запрос
select t2.before_timestamp, t2.timestamp
from (select t.timestamp, lag(t.timestamp) over (order by t.id) before_timestamp
from t) t2
where t2.before_timestamp is not null
and extract(epoch from t2.timestamp - t2.before_timestamp) > 60 -- 60 сек. макс. допустимый интервал между событиями