您的位置:首页 > 其它

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

2014-08-12 15:25 127 查看
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%'
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: