select nvl(YP,'合计') as 油品,DM,DK,BDX,DM+DK+BDX from (select nvl(ylmc,'其他') YP,sum(decode(jzxsyg,'1'源孙改凯明,zl)) DM,sum(decode(jzxsyg,'3',zl)) DK,sum(decode(jzxsyg,'4',zl)) BDX from (select g.ylmc ylmc,g.jzxsyg jzxsyg,sum(s.zl) zl from TAB_YKZH_CCGL_YGJCLSSJ sinner join TAB_GYXX_GKSX g on s.YGMC=g.GKMC group by g.jzxsyg,g.ylmc) group by cube(nvl(ylmc,'其雹判他')))
版权声明:文章由 百问九 整理收集,来源于互联网或者用户投稿,如有侵权,请联系我们,我们会立即处理。如转载请保留本文链接:https://www.baiwen9.com/answer/137892.html