Here is my query:
select
A.school_dim_id,
A.platform_dim_id,
A.month_dim_id,
CASE WHEN B.SCHOOLTYPE NOT IN ('International') THEN B.ROLLSIZE
WHEN B.SCHOOLTYPE IN ('International') THEN MAX(D.ROLE_SIZE)
END ROLL_SIZE
from
rag_raw_event_detail_fact A inner join rag_school_dim B on (A.school_dim_id = B.school_dim_id)
inner join rag_subscription_detail_fact C on (A.school_dim_id = C.school_dim_id)
inner join rag_intl_school_roll_static D on (D.isbn = c.isbn)
inner join rag_platform_dim E on (E.platform_dim_id = A.platform_dim_id)
where
E.PLATFORM_EVENT = 'alp_wordsmith_resources_opened'
and C.service in ('PriHubsWordsmith','PriHubsWordsmithGlobal')
and C.enddate > sysdate
group by
A.school_dim_id,
A.platform_dim_id,
A.month_dim_id
While running the above SQL, I'm getting the error as mentioned below:
ORA-00979: not a GROUP BY expression
00979. 00000 - "not a GROUP BY expression"
*Cause:
*Action:
Error at Line: 5 Column: 13
I need help to overcome the above error.