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

【数据处理】各门店销售库存数据分析

时间:2014-08-12 16:59:34      阅读:197      评论:0      收藏:0      [点我收藏+]

标签:数据   2014   ef   on   sp   dp   rom   select   

select a.pluno,a.pluname,a.spec,a.curcsprc ,a.slprc ,
d.qty 西部销售,e.qty 东部销售,f.qty 中区销售,g.qty 团购销售,
a1.qty 西部库存,a2.qty 东部库存,a3.qty 中区库存,a4.qty 团购库存
from 商品码 a
left join (select pluno,sum(qty) qty from xbxs where rq between ‘20140701‘ and ‘20140801‘ group by pluno ) d on a.pluno=d.pluno
left join (select pluno,sum(qty) qty from dbxs where rq between ‘20140701‘ and ‘20140801‘ group by pluno ) e on a.pluno=e.pluno
left join (select pluno,sum(qty) qty from zqxs where rq between ‘20140701‘ and ‘20140801‘ group by pluno ) f on a.pluno=f.pluno
left join (select pluno,sum(qty) qty from tgxs where rq between ‘20140701‘ and ‘20140801‘ group by pluno ) g on a.pluno=g.pluno
left join (select pluno,qty from sskc where mddm=‘6015‘) a1 on a.pluno=a1.pluno
left join (select pluno,qty from sskc where mddm=‘7606‘) a2 on a.pluno=a2.pluno
left join (select pluno,qty from sskc where mddm=‘0004‘) a3 on a.pluno=a3.pluno
left join (select pluno,qty from sskc where mddm=‘0008‘) a4 on a.pluno=a4.pluno
where a.dptno like ‘1005%‘

 

【数据处理】各门店销售库存数据分析,布布扣,bubuko.com

【数据处理】各门店销售库存数据分析

标签:数据   2014   ef   on   sp   dp   rom   select   

原文地址:http://www.cnblogs.com/nlg3413/p/3907405.html

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