select a."name",a."count",a."all",a."alloc",a."used",
100-round(((a."all"-a."alloc"+(a."alloc"-a."used"))/a."all")*100,2) "%"
 from (select tablespace_name "name",
       count(file_name) "count",
       round(sum(DECODE(autoextensible,'YES',maxbytes,'NO',bytes))/1024/1024/1024) "all",
       round(sum(bytes)/1024/1024/1024) "alloc",
       round(sum(user_bytes)/1024/1024/1024) "used"
  from DBA_DATA_FILES group by tablespace_name
union all
select tf.tablespace_name "name",
       count(tf.file_name) "count",
       round(sum(DECODE(tf.autoextensible,'YES',tf.maxbytes,'NO',tf.bytes))/1024/1024/1024) "all",
       round(sum(tf.bytes)/1024/1024/1024) "alloc",
       round((sum(tf.bytes)-fs.free_space)/1024/1024/1024) "used"
  from DBA_TEMP_FILES tf, DBA_TEMP_FREE_SPACE fs
  where fs.tablespace_name=tf.tablespace_name
 group by tf.tablespace_name,fs.free_space ) a order by 6 desc