Quiero contar los que son solo 0, los que son solo 9 y los que tienen 0 y 9. El tema es que no me genera el OR exclusivo.
select count(distinct (cuit_nu))
from p_dw_explo.cpd_mensual as a
left join p_dw_explo.ch_cheque_cartera as b on (a.nro_boleta_nu = b.CHBC_Nro_Boleta and a.operacion_tx=b.LOAN_Nro_Oper and a.importe_vl= b.CHCC_Imp_Cheque and a.nro_ch_nu=b.CHCC_Nro_Cheque)
where proc_fc>= date '2020-06-01' and b.ch_instrumento_cod = 9 and b.ch_instrumento_cod <> 0.