Skip to content

Instantly share code, notes, and snippets.

@atopal
Last active December 11, 2015 21:49
Show Gist options
  • Save atopal/4665422 to your computer and use it in GitHub Desktop.
Save atopal/4665422 to your computer and use it in GitHub Desktop.
Number of new contributors (registered contributors per day)
# Shows additions to the groups 'registered as contributors' per day
SELECT DATE(`auth_user`.`date_joined`), count(*)
FROM `auth_user_groups`
JOIN `auth_user` on `auth_user`.`id`=`auth_user_groups`.`user_id`
WHERE `auth_user_groups`.`group_id` = '45'
AND DATE(`auth_user`.`date_joined`) > '2012-01-01'
GROUP BY DATE(`auth_user`.`date_joined`);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment