当前位置: 移动技术网 > IT编程>数据库>MSSQL > SQL中两数相除保留两位小数的实现方法

SQL中两数相除保留两位小数的实现方法

2018年12月11日  | 移动技术网IT编程  | 我要评论

世界不为人知的秘密,残阳神仙道,三藏网

sql中两数相除保留两位小数的实现方法

select agent_id,city_name,agent_name,
round(convert((sum(cont)-sum(before_cont)),signed)/convert(sum(before_cont),signed),2)
as cont_increase from

    gt_report_receive_sort_week
    gt_report_receive_sort_month


    and datetime >= ${starttime}
    and datetime < ${endtime}
    and city_id = #{cityid}

group by agent_id order by cont_increase

    desc
    asc

limit 10

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网