问答详情
源自:4-2 [MySQL] 如何计算累进税

税率查询语句

税率查询语句

提问者:caibinxl 2015-07-18 14:51

个回答

  • Owl_Tam
    2016-03-08 14:52:25

    select user_name,sum(curmoney*rate) from (select user_name,money,low,high,least(money-low,high-low) as curmoney,rate from user1 a join taxRate b on a.money > b.low) a group by user_name