Last active
August 29, 2015 14:03
-
-
Save RafaelFunchal/c1e2db8fe5093fba20e7 to your computer and use it in GitHub Desktop.
SQL to unsubscribe inactive subscribers, never opened and never clicked in MailPoet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE wp_wysija_user as A | |
JOIN ( | |
SELECT user_id | |
FROM wp_wysija_email_user_stat | |
GROUP BY user_id | |
HAVING SUM(status) <= 0 | |
) B ON A.user_id = B.user_id | |
SET A.status = -1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment