Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-00979: not a GROUP BY expression

JhilApr 24 2019 — edited Apr 30 2019

Hi,

Can anyone update, what is error here ?

set pages 9999 lines 300

col tablespace_name format a15

col segment_name format a40

col segment_type format a20

col PARTITION_NAME format a20

col mb format 999,999,999

select owner

, tablespace_name

, segment_name

, segment_type

, PARTITION_NAME

, ceil(sum(bytes) / 1024 / 1024) "Size in MB"

from dba_segments

where tablespace_name like '&tablespace_name'

group by segment_name

order by ceil(sum(bytes) / 1024 / 1024) desc

/

Enter value for tablespace_name: USERS
select owner
        *
ERROR at line 1:
ORA-00979: not a GROUP BY expression

This post has been answered by Sven W. on Apr 24 2019
Jump to Answer
Comments
Post Details
Added on Apr 24 2019
9 comments
517 views