MySQL中select语句查询不到数据的问题
用下面的SQL查不出数据
select sum(b.zj),b.ysxxh from uf_xtyyxmkp a,uf_xtyyxmkp_dt4 b where a.id=b.mainid and b.ysxxh in (select group_concat(id) as id from FnaBudgetfeeType where supsubject in(select supsubject from FnaBudgetfeeType where id='968') and id <> '968') and a.id='19' and a.hsn='2022' GROUP BY b.ysxxh
子查询中是有查出数据的
select group_concat(id) as id from FnaBudgetfeeType where supsubject in(select supsubject from FnaBudgetfeeType where id='968') and id <> '968'
下图为其中子查询查出的结果
将子查询的结果单独复制进上面的SQL中也可以正常查出数据
select sum(b.zj),b.ysxxh from uf_xtyyxmkp a,uf_xtyyxmkp_dt4 b where a.id=b.mainid and b.ysxxh in (904,917,920,952,971,997,1002,1005,1008,1016,1019,1022) and a.id='19' and a.hsn='2022' GROUP BY b.ysxxh
麻烦帮忙看下为什么吗?