I am using MySQL, I have a table mtn_extract_list_email where there are columns called company,office,email,country and rating
I dont want emails that have domains aol , gmail, google
the query I am using is
select email from mtn_extract_list_email where (company like '%XYZ%' or office like '%XYZ%')
and (email not like '%@aol%' or email not like '%@gmail%' or email not like '%@google%')
and (Country = 'USA' and rating like 'A%')
and email is not null;
this query fetches data but i noticed that it also fetched one email with @gmail as domain. I tried adjusting "AND" and "or" logic but still no luck. please guide what is wrong with my query.
OR.