ORA-00937: 不是單組分組函數


缺少了分組條件

比如

SELECT teller_code,(select xm from sys_dict_ggczy d where d.czy=a.teller_code ) as teller_name, SUM(TRX_NUM) SUM_TRX_NUM, SUM(OCR_TRX_NUM) SUM_OCR_TRX_NUM, 100*(fun_formatdecstr2(round(to_number(SUM(OCR_TRX_NUM) ,'999999999.000')/ case when SUM(TRX_NUM) = 0 then 1 else SUM(TRX_NUM) end,2))) || '%' sbl FROM rpt_pvoas_statistic a

就報這個錯誤,然后添加分組條件就好了

group by teller_code

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM