Question:
I try to query this code but i got the error massage. “ORA-00979: not a GROUP BY expression” Can we use case SUM and Max in group by function.Answer:
Can we use case SUM and Max in group by function.
Yes
However, your problem is that you use
PROCESSMASTER.COMP_FLG =1 AND PROCESS.MED_PROC_CD = 'OUT-P'
inside the CASE
expression and neither PROCESSMASTER.COMP_FLG
nor PROCESS.MED_PROC_CD
are in the GROUP BY
clause or inside of an aggregation function.You either want:
If you have better answer, please add a comment about this, thank you!