select *
from (select owner, segment_name, sum(GB)
from (select OWNER, SEGMENT_NAME, BYTES / 1024 / 1024 / 1024 GB
from dba_segments
where owner = ' USERNAME'
and segment_type = 'TABLE'
and segment_name not LIKE '%LOG%'
union all
select A.OWNER, B.TABLE_NAME, A.BYTES / 1024 / 1024 / 1024 GB
from dba_segments a, dba_lobs b
where a.owner = ' USERNAME'
and b.owner = ' USERNAME'
AND A.segment_name = B.SEGMENT_NAME
and a.segment_type = 'LOBSEGMENT'
AND b.table_name not like '%LOG%') a
group by owner, segment_name
order by 3 desc) bb
where rownum < 21
from (select owner, segment_name, sum(GB)
from (select OWNER, SEGMENT_NAME, BYTES / 1024 / 1024 / 1024 GB
from dba_segments
where owner = ' USERNAME'
and segment_type = 'TABLE'
and segment_name not LIKE '%LOG%'
union all
select A.OWNER, B.TABLE_NAME, A.BYTES / 1024 / 1024 / 1024 GB
from dba_segments a, dba_lobs b
where a.owner = ' USERNAME'
and b.owner = ' USERNAME'
AND A.segment_name = B.SEGMENT_NAME
and a.segment_type = 'LOBSEGMENT'
AND b.table_name not like '%LOG%') a
group by owner, segment_name
order by 3 desc) bb
where rownum < 21