[Data Processing] analysis of sales inventory data of each store

Source: Internet
Author: User

Select a. pluno, A. pluname, A. spec, A. curcsprc, A. slprc,
D. qty Western sales, E. qty Eastern sales, F. qty central sales, G. qty group buying sales,
A1.qty West inventory, a2.qty East inventory, a3.qty central inventory, a4.qty group buying inventory
From commodity code
Left join (select pluno, sum (qty) qty from xbxs where RQ between '000000' and '000000' group by pluno) D on A. pluno = D. pluno
Left join (select pluno, sum (qty) qty from dbxs where RQ between '000000' and '000000' group by pluno) e on A. pluno = E. pluno
Left join (select pluno, sum (qty) qty from zqxs where RQ between '000000' and '000000' group by pluno) F on A. pluno = f. pluno
Left join (select pluno, sum (qty) qty from tgxs where RQ between '000000' and '000000' group by pluno) g on A. pluno = G. pluno
Left join (select pluno, qty from sskc where mddm = '000000') A1 on a. pluno = a1.pluno
Left join (select pluno, qty from sskc where mddm = '000000') A2 on A. pluno = a2.pluno
Left join (select pluno, qty from sskc where mddm = '000000') A3 on A. pluno = a3.pluno
Left join (select pluno, qty from sskc where mddm = '000000') A4 on A. pluno = a4.pluno
Where a. dptno like '20140901'

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.