@@header
set lines 200
set pages 50
set trimspool on
COLUMN "%age"          FORMAT 999
COLUMN tablespace_name FORMAT A20
COLUMN owner           FORMAT A20
COLUMN segment_name    FORMAT A30
COLUMN segment_type    FORMAT A20
COLUMN bytes           FORMAT 999,999,999,999 

select * from 
(select ROUND((BYTES/ sum.total_bytes*100),2)  "%age", tablespace_name, OWNER, segment_NAME, segment_TYPE, bytes
from dba_segments s,
     (select sum(bytes) total_bytes from dba_segments where owner = sys_context('USERENV','CURRENT_SCHEMA')) sum
where s.owner = sys_context('USERENV','CURRENT_SCHEMA')
ORDER BY 1 desc
)
where rownum < 21;

@@footer