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

happy10319Oct 18 2018 — edited Oct 26 2018

Hi all,

I ran the follwing:

SELECT  TARGET_NAME,

                METRIC_LABEL AS METRIC_GROUP,

        COLUMN_LABEL AS METRIC_NAME,

        TO_CHAR(ROLLUP_TIMESTAMP, 'MM/DD/YYYY HH24:MI:SS') AS ROLLUP_TIMESTAMP,

        AVG(AVERAGE),

        MIN(MINIMUM),

        MAX(MAXIMUM)

FROM    SYSMAN.MGMT$METRIC_DAILY

WHERE   TARGET_TYPE = 'host'

AND     METRIC_LABEL = 'Load'

AND   (  COLUMN_LABEL = 'CPU Utilization (%)' OR COLUMN_LABEL ='Memory Utilization (%)')

AND     TARGET_NAME in ('server1','server2','server3')

AND     ROLLUP_TIMESTAMP >= sysdate -6

AND     ROLLUP_TIMESTAMP < SYSDATE

GROUP BY ROLLUP_TIMESTAMP

ORDER BY   TARGET_NAME

And I got:

ORA-00979: not a GROUP BY expression

Any idea?

I tried with GROUP BY ROLLUP_TIMESTAMP HAVING ROLLUP_TIMESTAMP >= sysdate -6 but the same error.

Thanks

This post has been answered by Cookiemonster76 on Oct 18 2018
Jump to Answer
Comments
Post Details
Added on Oct 18 2018
5 comments
4,556 views