SELECT t.target_name, t.target_type, el.severity, DECODE (el.open_status, 1, 'Open', 'Closed'), el.msg, el.creation_date, el.incident_num, i.ticket_id FROM mgmt$events_latest el, mgmt$target t, mgmt$incidents i WHERE el.target_guid = t.target_guid AND I.INCIDENT_ID = el.incident_id AND t.target_type IN ('oracle_listener', 'oracle_database', 'rac_database', 'host') -- AND el.open_status = 1 AND TRUNC (el.creation_date) >= SYSDATE - 7 AND i.ticket_id IS NOT NULL ORDER BY 4 DESC