select a.XMBH00,b.SFXMID,a.xmmc00,decode(nvl(c.BAXMMC, ''), '', '未归档', c.BAXMMC) XMMC00, c.BAXMID FPXMID, sum(a.HJJE00) HJJE00, sum(a.ZFJE00) ZFJE00 from ZY_FYMX00 a, BM_YYSFXM b, BM_BAXM00 c, ZY_BRFY00 d where a.XMBH00 = b.SFXMID and b.BAXMID = c.BAXMID and d.DJH000 = a.DJH000 and d.zyid00 = '1626497' group by decode(nvl(c.BAXMMC, ''), '', '未归档', c.BAXMMC), c.BAXMID,a.xmmc00,a.XMBH00,b.SFXMID order by c.BAXMID,a.xmmc00