I'm trying to write an SQL command that returns emails that has the value
(track openers) and doesn't have the value (redirect) for the column action_type in the same table.
email countrycode action_type
email1@domain.com GB track openers
email1@domain.com GB redirect
email2@domain.com GB track openers
email2@domain.com GB redirect
email3@domain.com GB track openers
email3@domain.com GB redirect
email4@domain.com GB track openers <<
I have already tried this without success, it continues to show loading... without returning any results
SELECT DISTINCT LOWER(email) as `email`, `action_type`, `countrycode`
FROM `stats`
WHERE `email` NOT IN (SELECT `email` FROM `stats` WHERE `action_type` = 'redirect');
