想要查询时计算两个值相减,代码如下 select t.comp_code,t.khfl1_txt, t.jsl - t.jhl as kcl from( SELECT comp_code,khfl1_txt,sum(msdjsqty)/count(doc_num) AS jsl,sum(nvl(act_dl_qty,0)) AS jhl from app_yp.yc_kc_orc where jsdat <= '2022-12-20' ) t GROUP BY t.comp_code,t.khfl1_txt 请问为什么会报错呢 |