SELECT ev_a.device,
ev_a.ev_descr Description,
ev_a.ev_info info,
decode(ev_a.ev_action, 'NULL', 'keine Aktion', ev_a.ev_action) action,
ev_a.ev_date event_date,
ev_a.ev_st_tm start_time,
ev_a.ev_en_tm end_time,
ev_b.device "conc. Device",
rpad(ev_b.ev_descr, 20, ' ') || ': ' || rpad(ev_b.ev_info, 25, ' ') ||
' - ' || decode(ev_b.ev_action, 'NULL', 'keine Aktion', ev_b.ev_action) "conc. Event",
ev_b.ev_st_tm || ' - ' || ev_b.ev_en_tm "Time"
FROM (SELECT t.device,
t.ev_descr,
t.ev_info,
t.ev_action,
t.ev_date,
t.ev_st_tm,
t.ev_en_tm,
to_date(to_char(t.ev_date, 'dd.mm.yyy') || ' ' || t.ev_st_tm,
'dd.mm.yyyy hh24:mi') st_dttm,
to_date(to_char(t.ev_date, 'dd.mm.yyy') || ' ' || t.ev_en_tm,
'dd.mm.yyyy hh24:mi') en_dttm,
ROWID
FROM [TABELLE] t) ev_a,
(SELECT t.device,
t.ev_descr,
t.ev_info,
t.ev_action,
t.ev_date,
t.ev_st_tm,
t.ev_en_tm,
to_date(to_char(t.ev_date, 'dd.mm.yyy') || ' ' || t.ev_st_tm,
'dd.mm.yyyy hh24:mi') st_dttm,
to_date(to_char(t.ev_date, 'dd.mm.yyy') || ' ' || t.ev_en_tm,
'dd.mm.yyyy hh24:mi') en_dttm,
ROWID
FROM [TABELLE] t) ev_b
WHERE (EV_B.st_dttm BETWEEN ev_a.st_dttm AND ev_a.en_dttm OR
EV_B.en_dttm BETWEEN ev_a.st_dttm AND ev_a.en_dttm) AND
ev_a.ROWID != ev_b.ROWID
ORDER BY ev_a.device,
ev_a.st_dttm,
ev_a.ev_action,
ev_b.st_dttm