Ver originalSELECT nit,1 as total FROM entidades where nit not in (select DISTINCT nit from tablax) and nit not in (select DISTINCT nit from tablay)and nit!='' and nit!=0