Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
This query is marked as a draft
This query has been published
by
Echodarkstar00
.
Toggle Highlighting
SQL
#Preliminary approach: return user edit counts, a field already tracked by wikis. #caveats: not accurate, for details refer to Manual:user table, user_editcount #time complexity: slow for large wikis/more users #includes bots SELECT user.user_id, user.user_name, user.user_editcount FROM user INNER JOIN user_groups ON user.user_id = user_groups.ug_user WHERE user_groups.ug_group != 'bot' ORDER BY user_editcount DESC LIMIT 10 #Inner join / Extracting all revisions made by all users that have made a revision in this wiki #SELECT actor.actor_name, COUNT(revision.rev_actor) AS Edits #FROM actor #INNER JOIN revision ON actor.actor_id = revision.rev_actor #GROUP BY actor.actor_name #ORDER BY Edits DESC #LIMIT 10 #Interestingly, the two approaches above result in slightly different rankings #Some user edit counts are undercounted and some are overcounted in the first approach #Since it doesn't involve a join, first approach is faster
By running queries you agree to the
Cloud Services Terms of Use
and you irrevocably agree to release your SQL under
CC0 License
.
Submit Query
Stop Query
All SQL code is licensed under
CC0 License
.
Checking query status...