Last active
July 28, 2020 20:01
-
-
Save dparker1005/d21cba4286fc0f4fbfc6a8ef699823b5 to your computer and use it in GitHub Desktop.
Get the users who were active on a specific date (as written, June 1st 2020)
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 distinct mu.user_id, u.user_email FROM wp_pmpro_memberships_users AS mu | |
LEFT JOIN wp_users AS u | |
ON mu.user_id = u.id | |
WHERE mu.startdate < "2020-06-01 23:59:59" | |
AND ( mu.enddate > "2020-06-01 00:00:00" OR mu.enddate = "0000-00-00 00:00:00" OR mu.enddate is NULL ) | |
ORDER BY mu.user_id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment