set pagesize 0
spool capacity_history.csv
select to_char(snapshot_date,'DD/MM/YYYY')||','||owner||','||segment_type||','||objectname||','||sizemb
  from capacity_history 
 where to_char(snapshot_date,'HH24') in ('23')
   and owner = 'CRD_ADMIN'
 order by snapshot_date, owner, segment_type, sizemb;
spool off
