Использование lead
аналитической функции способно решить вашу проблему как
select site, meter_code, enter_dt, exit_dt
from
(
with mtr_actions( site, meter_code, action_date, action ) as
(
select 1,'MTR1',date'2012-03-21','IN' from dual union all
select 1,'MTR1',date'2012-04-24','READ' from dual union all
select 1,'MTR1',date'2012-05-23','READ' from dual union all
select 1,'MTR1',date'2016-05-27','OUT' from dual union all
select 2,'MTR1',date'2016-05-28','IN' from dual union all
select 1,'MTR1',date'2016-06-27','SKIP' from dual union all
select 2,'MTR1',date'2016-06-27','READ' from dual union all
select 2,'MTR1',date'2016-06-28','OUT' from dual union all
select 5,'MTR1',date'2016-06-29','IN' from dual
)
select t.action, site, meter_code, action_date as enter_dt,
lead(t.action_date) over (order by t.action_date) as exit_dt
from mtr_actions t
where t.action in ('IN','OUT')
)
where action = 'IN';
SITE METER_CODE ENTER_DT EXIT_DT
------ ---------- ---------- ----------
1 MTR1 21.03.2012 27.05.2016
2 MTR1 28.05.2016 28.06.2016
5 MTR1 29.06.2016
Rextester Demo