select count(*) from (select * from ZFRYJDM2405301 where CODE_STATE = '01'and name is not null and zfdw is not null and zfcode is not null group by ZFCODE) x
select count(*) from (select * from ZFRYJDM2405301 where CODE_STATE = '01'and name is not null and zfdw is not null and zfcode is not null group by sfzcode) x