free.sql

column Tablespace_Name format A20
column Pct_Free format 999.99
select Tablespace_Name,
Max_Blocks,
Count_Blocks,
Sum_Free_Blocks,
100*Sum_Free_Blocks/Sum_Alloc_Blocks AS Pct_Free
from
(select Tablespace_Name, SUM(Blocks) Sum_Alloc_Blocks
from DBA_DATA_FILES 
group by Tablespace_Name), 
   (select Tablespace_Name FS_TS_NAME,
   MAX(Blocks)  AS Max_Blocks,
   COUNT(Blocks)  AS Count_Blocks,
   SUM(Blocks) AS Sum_Free_Blocks
   from DBA_FREE_SPACE
   group by Tablespace_Name)
where Tablespace_Name = FS_TS_NAME;