Last active
June 11, 2016 21:18
-
-
Save iambriansreed/41326bd903877a0d20af745e772f2b87 to your computer and use it in GitHub Desktop.
This file contains 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
SELECT * FROM wp_users | |
LEFT JOIN wp_usermeta as stripe_meta on stripe_meta.user_id = wp_users.ID && stripe_meta.meta_key = 'stripe_customer_id' | |
LEFT JOIN wp_usermeta as role_meta on role_meta.user_id = wp_users.ID && role_meta.meta_key = 'wp_capabilities' | |
WHERE | |
1=1 | |
AND stripe_meta.meta_value IS NULL | |
AND role_meta.meta_value LIKE '%subscriber%' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment