@@header

COLUMN blackout_name                HEADING "BlackoutName"            FORMAT a35
COLUMN status                       HEADING "Status"                  FORMAT a10
COLUMN start_time                   HEADING "StartTime"               FORMAT a18
COLUMN end_time                     HEADING "EndTime"                 FORMAT a18
COLUMN created_by                   HEADING "CreatedBy"               FORMAT a15
COLUMN target_type                  HEADING "TargetType"              FORMAT a15
COLUMN target_name                  HEADING "TargetName"              FORMAT a45 TRUNCATE

BREAK ON blackout_name ON status ON created_by

SELECT bh.blackout_name
     , bh.status
     , bh.created_by
     , TO_CHAR(bh.start_time,'DD-MON-YY HH24:MI:SS') start_time
     , bh.end_time
     , bh.target_type
     , bh.target_name
  FROM mgmt$blackout_history bh
ORDER BY bh.start_time asc;

@@footer
