Comparing Query- redundancy select DISTINCT B.`Product#`,
                B.`Contact Email Address`,
CASE when A.`Product#` IS NULL then 'Yes' ELSE 'NO' END  as New customer
from `Table B` as B
LEFT JOIN `Table A` as A 
ON A. `product#`= B.`product#`                  


What wrong in my query. I see lot of product # is repeated. Also it says "Yes" when Product # is there in Table B but none in table A..
Consider using this for the yes/no:

IF(EXISTS( SELECT 1 FROM A WHERE product_no = B.product_no ), 'Yes', 'No') AS NewCustomer