Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
Fork of
Enwiki editors who might make good admins
by
Novem Linguae
This query is marked as a draft
This query has been published
by
Certes
.
Toggle Highlighting
SQL
SELECT user_editcount, user_name, user_registration FROM user -- more than 8000 edits WHERE user_editcount > 10000 AND user_name LIKE "Z%" -- not already an admin AND NOT EXISTS (SELECT * FROM user_groups WHERE ug_user = user_id AND ug_group = 'sysop' ) -- not a bot -- MariaDB documentation says that LIKE is case insensitive, but my testing on Quarry reveals it to be case sensitive here AND NOT EXISTS (SELECT * FROM user_groups WHERE ug_user = user_id AND ug_group = 'bot' ) AND CONVERT(user_name USING latin1) NOT LIKE '%bot' AND CONVERT(user_name USING latin1) NOT LIKE '%bot %' -- never blocked -- need log_namespace = 2 for indexing reasons. log_namespace and log_title are indexed together. else the query times out. /*AND NOT EXISTS (SELECT * FROM logging_logindex WHERE log_type = 'block' AND log_action = 'block' AND log_namespace = 2 AND log_title = REPLACE(user_name, ' ', '_')) -- account age 2+ years AND user_registration < DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -2 YEAR), "%Y%m%d%H%i%s") -- edited in the last 30 days -- checking >200 edits in last 30 days was too slow AND EXISTS (SELECT * FROM actor JOIN recentchanges_userindex ON rc_actor = actor_id WHERE actor_user = user_id) -- RFA page does not exist yet (no previous RFAs) AND NOT EXISTS (SELECT * FROM page WHERE page_namespace = 4 AND page_title = CONCAT('Requests_for_adminship/', REPLACE(user_name, ' ', '_'))) -- user has one of the good article templates on their user page AND EXISTS (SELECT * FROM categorylinks WHERE cl_to = 'Wikipedia_Good_Article_contributors' AND cl_from = (SELECT page_id FROM page WHERE page_namespace = 2 AND page_title = REPLACE(user_name, ' ', '_')))*/ -- advanced perms such as NPR, TE, etc?? ORDER BY user_editcount DESC
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...