SELECT owner, wsize "Size in MB"
FROM ( SELECT owner, sum(bytes/(1024*1024)) wsize, RANK() OVER (ORDER BY sum(bytes/(1024*1024)) DESC) sal_rank
FROM dba_segments group by owner)
WHERE sal_rank <= 5;
SELECT owner, wsize "Size in MB"
FROM ( SELECT owner, sum(bytes/(1024*1024)) wsize, DENSE_RANK() OVER (ORDER BY sum(bytes/(1024*1024)) DESC) sal_rank
FROM dba_segments group by owner)
WHERE sal_rank <= 5;
FROM ( SELECT owner, sum(bytes/(1024*1024)) wsize, RANK() OVER (ORDER BY sum(bytes/(1024*1024)) DESC) sal_rank
FROM dba_segments group by owner)
WHERE sal_rank <= 5;
SELECT owner, wsize "Size in MB"
FROM ( SELECT owner, sum(bytes/(1024*1024)) wsize, DENSE_RANK() OVER (ORDER BY sum(bytes/(1024*1024)) DESC) sal_rank
FROM dba_segments group by owner)
WHERE sal_rank <= 5;