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