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

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)

posted @ 2019-07-27 15:29  吉连  阅读(155)  评论(0编辑  收藏  举报