break on "thread#"

set head off
SELECT 'HISTORICO DA GERACAO DE ARCHIVE NAS ULTIMAS 24HS em ' || instance_name || '@' || host_name
FROM GV$INSTANCE
/
set head on

SELECT 
  thread# as "thread#"
 ,to_char(TRUNC(COMPLETION_TIME,'HH'), 'dd/mm hh24:mi' ) HORA
 ,round(sum(blocks * block_size)/1048576,2) MB
 ,round(sum(decode(deleted, 'NO', blocks * block_size, 0 ) ) / 1048576, 2 ) EM_DISCO
FROM gv$archived_log 
WHERE COMPLETION_TIME > SYSDATE -1
--AND DELETED ='NO'
GROUP BY rollup( thread#, TRUNC(COMPLETION_TIME,'HH') )
ORDER BY thread#, TRUNC(COMPLETION_TIME,'HH')
/

clear break 

hostgator