Last active
August 2, 2016 14:22
-
-
Save atopal/eaedf01a02862db6a991fd870305bc73 to your computer and use it in GitHub Desktop.
Number of Persona active accounts without Github auth
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
SELECT count(*) | |
FROM | |
(SELECT * | |
FROM `socialaccount_socialaccount` | |
WHERE `socialaccount_socialaccount`.`provider`="persona") A | |
LEFT JOIN | |
(SELECT * | |
FROM `socialaccount_socialaccount` | |
WHERE `socialaccount_socialaccount`.`provider`="github") B | |
ON A.`user_id` = B.`user_id` | |
JOIN `auth_user` ON `auth_user`.`id` = A.`user_id` | |
WHERE B.`user_id` IS NULL | |
AND `auth_user`.`is_active` = 1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment