Skip to content

Instantly share code, notes, and snippets.

@atopal
Last active August 26, 2016 10:44
Show Gist options
  • Save atopal/21bffa9a7f8ef6a8d198953106b4a95f to your computer and use it in GitHub Desktop.
Save atopal/21bffa9a7f8ef6a8d198953106b4a95f to your computer and use it in GitHub Desktop.
Number of accounts with Pesona and Github auth
SELECT count(*)
FROM
(SELECT *
FROM `socialaccount_socialaccount`
WHERE `socialaccount_socialaccount`.`provider`="persona") A
INNER JOIN
(SELECT *
FROM `socialaccount_socialaccount`
WHERE `socialaccount_socialaccount`.`provider`="github") B
ON A.`user_id` = B.`user_id`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment