select *,divide(fund_pay_sumamt, medfee_sumamt), fund_pay_sumamt/medfee_sumamt from (
select year(setl_time),SUM(fund_pay_sumamt)fund_pay_sumamt,sum(medfee_sumamt)medfee_sumamt from db_yb.psn_selt_d_info
group by year(setl_time)
)t
结果为空
select *,divide(fund_pay_sumamt, medfee_sumamt), fund_pay_sumamt/medfee_sumamt from (
select year(setl_time),SUM(fund_pay_sumamt)fund_pay_sumamt,sum(medfee_sumamt)medfee_sumamt from db_yb.psn_selt_d_info
group by year(setl_time)
)t
结果为空
提供个query dump
超过decimal精度了,尝试降低一下SUM之后的精度