nlg3413

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%\'

 

分类:

技术点:

相关文章:

  • 2021-11-27
  • 2021-06-04
  • 2021-08-11
  • 2021-12-04
  • 2021-12-25
  • 2021-11-08
  • 2021-11-08
  • 2021-11-03
猜你喜欢
  • 2021-04-24
  • 2021-11-08
  • 2021-11-01
  • 2021-05-10
  • 2021-08-13
  • 2021-08-02
  • 2021-08-13
相关资源
相似解决方案