I need to left join two tables:
- One table has emails
- The other table, is a domain blacklist.
I did something like this:
SELECT
CASE
WHEN b.domain IS NULL then "Invalid"
ELSE "Valid"
END as Validated
FROM Emails e
LEFT JOIN DomainBlacklist b
ON ENDS_WITH(LOWER(e.email), LOWER(b.domain))
But throws me an error:
"LEFT OUTER JOIN cannot be used without a condition that is an equality of fields from both sides of the join."
Someone know how can I solve this?
Thanks!