I have two tables.
- Contacts table – contact_id, contact_email, contact_name, etc
- Opt out table – contact_email, scope of their opt out (event, company)
So one contact maybe have multiple event opt-outs but what I really care about is if they have a company wide opt out.
How do I join the data so that if a contact has a match with any row in the optout table that has a scope of “company” it will not show up in the result?
This could also be done with a
LEFT JOIN: