TTITLE LEFT SKIP 1 "NUMERO DE REDO LOGS ESCRITOS POR DIA DO MES" SKIP 2
SET lines 200 PAGES 100
CLEAR COLUMNS
COL np 	 NOPRinT
COL "00"  FORM 099 
COL "01"  FORM 099 
COL "02"  FORM 099
COL "03"  FORM 099 
COL "04"  FORM 099 
COL "05"  FORM 099
COL "06"  FORM 099 
COL "07"  FORM 099 
COL "08"  FORM 099
COL "09"  FORM 099 
COL "10"  FORM 099 
COL "11"  FORM 099
COL "12"  FORM 099 
COL "13"  FORM 099 
COL "14"  FORM 099
COL "15"  FORM 099 
COL "16"  FORM 099 
COL "17"  FORM 099
COL "18"  FORM 099 
COL "19"  FORM 099 
COL "20"  FORM 099
COL "21"  FORM 099 
COL "22"  FORM 099 
COL "23"  FORM 099
SELECT 
	   TRUNC(first_time) np, TO_CHAR(first_time,'DD/MM-DY') "DIA",
	   SUM(DECODE(TO_CHAR(first_time,'HH24'),'00',1,0)) "00" , 
	   SUM(DECODE(TO_CHAR(first_time,'HH24'),'01',1,0)) "01" , 
	   SUM(DECODE(TO_CHAR(first_time,'HH24'),'02',1,0)) "02" , 
	   SUM(DECODE(TO_CHAR(first_time,'HH24'),'03',1,0)) "03" , 
	   SUM(DECODE(TO_CHAR(first_time,'HH24'),'04',1,0)) "04" , 
	   SUM(DECODE(TO_CHAR(first_time,'HH24'),'05',1,0)) "05" , 
	   SUM(DECODE(TO_CHAR(first_time,'HH24'),'06',1,0)) "06" , 
	   SUM(DECODE(TO_CHAR(first_time,'HH24'),'07',1,0)) "07" , 
	   SUM(DECODE(TO_CHAR(first_time,'HH24'),'08',1,0)) "08" , 
	   SUM(DECODE(TO_CHAR(first_time,'HH24'),'09',1,0)) "09" , 
	   SUM(DECODE(TO_CHAR(first_time,'HH24'),'10',1,0)) "10" , 
	   SUM(DECODE(TO_CHAR(first_time,'HH24'),'11',1,0)) "11" , 
	   SUM(DECODE(TO_CHAR(first_time,'HH24'),'12',1,0)) "12" , 
	   SUM(DECODE(TO_CHAR(first_time,'HH24'),'13',1,0)) "13" , 
	   SUM(DECODE(TO_CHAR(first_time,'HH24'),'14',1,0)) "14" , 
	   SUM(DECODE(TO_CHAR(first_time,'HH24'),'15',1,0)) "15" , 
	   SUM(DECODE(TO_CHAR(first_time,'HH24'),'16',1,0)) "16" , 
	   SUM(DECODE(TO_CHAR(first_time,'HH24'),'17',1,0)) "17" , 
	   SUM(DECODE(TO_CHAR(first_time,'HH24'),'18',1,0)) "18" , 
	   SUM(DECODE(TO_CHAR(first_time,'HH24'),'19',1,0)) "19" , 
	   SUM(DECODE(TO_CHAR(first_time,'HH24'),'20',1,0)) "20" , 
	   SUM(DECODE(TO_CHAR(first_time,'HH24'),'21',1,0)) "21" , 
	   SUM(DECODE(TO_CHAR(first_time,'HH24'),'22',1,0)) "22" , 
	   SUM(DECODE(TO_CHAR(first_time,'HH24'),'23',1,0)) "23" 
FROM 
	v$loghist
GROUP BY 
	TRUNC(first_time), TO_CHAR(first_time,'DD/MM-DY')
ORDER 
	BY TRUNC(first_time);
TTITLE OFF

hostgator