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-00934: group function is not allowed here

ABU JAMANMar 10 2020 — edited Mar 10 2020

Hi all,

Good Morning. My db version is 12.2. I am getting below errors. I appreciate if someone help out this querry

SQL> ed

Wrote file afiedt.buf

  1  select SEGMENT_NAME, sum(BYTES)/1024/1024/1024 SIZEGB,count(*) TOTAL_PARTIT

IONS,tablespace_name

  2      FROM DBA_SEGMENTS

  3      WHERE SEGMENT_TYPE='TABLE PARTITION'

  4      AND OWNER='SYSMAN'

  5      and tablespace_name in ('MGMT_TABLESPACE')

  6      AND

  7      sum(BYTES)/1024/1024/1024>2

  8      GROUP BY SEGMENT_NAME,tablespace_name

  9*     ORDER BY SIZEGB DESC

SQL> /

    sum(BYTES)/1024/1024/1024>2

    *

ERROR at line 7:

ORA-00934: group function is not allowed here

This post has been answered by ABU JAMAN on Mar 10 2020
Jump to Answer
Comments
Post Details
Added on Mar 10 2020
5 comments
1,602 views