select xmbh00,xmmc00,sum(xmsl00),sum(zfje00) from zy_fymx00 where xmbh00 in( '22002', '22003', '22005', '22175', '22177', '22201', '22202', '22753', '22754', '22876', '22877', '22973', '22974', '22977', '22986', '22987', '22990', '22994', '22997', '22998', '23016', '23021', '23030', '23031', '23032', '23033', '23034', '23035', '23036', '23112', '23113', '23121', '23168', '40337', '40360', '40361', '40362' ) and czrq00 between '20160801' and '20160831' and zxks00='257' group by xmbh00,xmmc00