Skip to content Skip to sidebar Skip to footer

Using Iw And Mm In Oracle

I'm using IW for weekly result and MM for Monthly result. But I always get an error: ORA-00979: not a GROUP BY expression 00979. 00000 - 'not a GROUP BY expression' My queries ar

Solution 1:

You have to group by the same expression you use in the SELECT clause.

So if you:

SELECT TRUNC(t.CREATE_TIME, 'MM') AS report_date,count(*) AS cnt_opened

... then you have to ...

GROUPBY TRUNC(t.CREATE_TIME,'MM')

Post a Comment for "Using Iw And Mm In Oracle"