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