缺少了分組條件
比如
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