Created
August 9, 2021 19:46
-
-
Save petrusnog/6a304c75273bfdf5754d90377fd0be7b to your computer and use it in GitHub Desktop.
SQL that filters users by some metadata existance.
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 u.ID, u.user_login, u.user_nicename, u.user_email | |
FROM wp_users u | |
INNER JOIN wp_usermeta m ON m.user_id = u.ID | |
WHERE m.meta_key = 'billing_rg'!=''; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment