- select B."地区",B."年",B."月",sum(B.销售收入合计) 销售收入合计,sum(B.销售税额合计) 销售税额合计,sum(B.普票采购价税合计) 普票采购价税合计,sum(B.专票采购价税合计) 专票采购价税合计,sum(B.专票采购税额合计)专票采购税额合计
- from
- (
- SELECT A."地区",A."年",A."月",销售收入合计,销售税额合计,0 "普票采购价税合计"
- ,0 "专票采购价税合计",0 "专票采购税额合计"
- FROM "销售收入"A
- union all
- SELECT A."地区",A."年",A."月",0 销售收入合计,0 销售税额合计,A."普票采购价税合计"
- ,0 "专票采购价税合计",0 "专票采购税额合计"
- FROM "采购成本_普票" A
- union all
- SELECT A."地区",A."年",A."月",0 销售收入合计,0 销售税额合计,0 "普票采购价税合计"
- ,A."专票采购价税合计",A."专票采购税额合计"
- FROM "采购成本_专票" A
- ) B
- group by B."地区",B."年",B."月"
复制代码 |