使用如下语句得到的33项数据,但其实RYBQ应该有58项,通过语句将那些ZYRS=0的RYBQ数据项没显示,应该得到那些RYBQ的数据项并显示为0,求问? select d.RYBQ , count(distinct a.SYXH) ZYRS from AA a (nolock) inner join BB b (nolock) on a.SYXH=b.SYXH left join CC c (nolock) on b.SYXH=c.SYXH and c.SSXH=1 left join DD d on b.SYXH = d.SYXH where a.ZDDM like 'C%%' and left(a.ZDDM, 3) not between 'C81' and 'C96' and left(b.CYRQ, 10) between '2023-04-08' and '2023-05-08' group by d.RYBQ |