Skip to content

Instantly share code, notes, and snippets.

@atopal
Last active December 15, 2015 05:09
Show Gist options
  • Select an option

  • Save atopal/5206459 to your computer and use it in GitHub Desktop.

Select an option

Save atopal/5206459 to your computer and use it in GitHub Desktop.
number of revisions created by users
SELECT `auth_user`.`username`, count(*) as edits
FROM `wiki_revision`
JOIN `wiki_document` on `wiki_revision`.`document_id`=`wiki_document`.`id`
JOIN `auth_user`on `wiki_revision`.`creator_id`=`auth_user`.`id`
WHERE `wiki_revision`.`created` >= '2013-01-01'
AND `wiki_document`.`locale` LIKE 'en-US'
GROUP BY `wiki_revision`.`creator_id` ORDER BY edits DESC;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment