sum(case when instr(','|| b.pslx||',',',2,') = ??? then 1 else 0 end ) as kx,
instr(','|| b.pslx||',',',2,') 就是这个位置,应该=什么什么,才为1,否则为0,你自己参考下自己的数据。