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 e
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 ...
GROUP BY TRUNC(t.CREATE_TIME,'MM')