A little rusty, but I would like to return all the Email in the Customers table which are not found in the MailingList table, So I’m using this query, but its taking a bit longer than expected. Is there any other type of logic I can use to make it go faster (Instead of ie M.Email <> C.Email ?
SELECT DISTINCT C.Email FROM CUSTOMERS C
INNER JOIN MailingList M ON M.Email <> C.Email
GROUP BY C.Email
You could do something like this:
I don’t think the grouping is necessary for either query.