select a.YSZID0, a.YSZMC0, a.SSKSBH, a.SSKSMC, a.YSZZT0 from ZS_YSZ000 a where a.YSZZT0 in ('1', '2') and a.SSBQ00 is not null and a.SSBQ00 in (select c.SSBQ00 from ZS_YSZ000 c where c.YSZZT0 in ('1', '2') and c.SSKSBH = 1096) and not exists (select 1 from ZS_YSZMX0 d where a.YSZID0 = d.YSZID0 and d.YSBH00 = 2826 and yszt00 <> '3') order by a.XSXH00, a.yszid0;