码迷,mamicode.com
首页 > 其他好文 > 详细

中转地所有票数数据查询统计

时间:2019-07-27 15:45:55      阅读:106      评论:0      收藏:0      [点我收藏+]

标签:select   name   HERE   dep   count   sum   order by   查询   where   

select disc_dept_name as 直达部门,dest_dept_name as 中转部门, sum(amount_freight) as 运费 ,count(amount_freight) as 合计票数
from ta_order_hdr
where dest_dept_id > 0
group by dest_dept_name,disc_dept_name
order by sum(amount_freight)

中转地所有票数数据查询统计

标签:select   name   HERE   dep   count   sum   order by   查询   where   

原文地址:https://www.cnblogs.com/superduan/p/11255269.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!