order by not working in the query.
set pagesize 50000
tti "Database growth per month for last year"
select to_char(creation_time, 'RRRR Month') "Month",
sum(bytes)/1024/1024 "Growth in Meg"
from sys.v_$datafile
where creation_time > SYSDATE-365
group by to_char(creation_time, 'RRRR Month')
order by to_char(creation_time, 'RRRR Month')
/
tti off
I ran this on a test database and got the following results:
Mon Jan 30 page 1
Database growth per month for last year
Month Growth in Meg
-------------- -------------
2011 July 4800
2011 June 1000
2011 March 3600
2011 May 1500
2011 October 1000
2011 September 22000
2012 January