set head off;
set feedb off;
set linesize 1000;
select metadata_defn, '-' ,
 round(max(ORDER_SEQUENCE)/3), '-',
 max(ORDER_SEQUENCE) total, '-',
 round(avg(total_entries)) avg
from metadata_statistics
where to_char(rundate,'YYYY-MM-DD-HH24.MI.SS') = '2007-09-21-13.03.18'
group by METADATA_DEFN;
quit ;
