Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
Fork of
2021 eligible voters for Board elections - v1
by
KCVelaga (WMF)
This query is marked as a draft
This query has been published
by
KCVelaga (WMF)
.
Toggle Highlighting
SQL
use satwiki_p; select user_name, twofifty.cnt as article_edits, onehundred.cnt as recent_edits, '' as voter_status from user join actor_logging on actor_user = user_id join ( select actor_user, min(rev_timestamp) as first_timestamp from revision_userindex join actor_revision on rev_actor = actor_id group by actor_user ) first_edit on user_id = first_edit.actor_user join ( select actor_user, count(*) cnt from revision_userindex join actor_revision on rev_actor = actor_id join page on page_id = rev_page where rev_timestamp < '20210705000000' -- edits prior to nomination start date group by actor_user having count(*) >= 250 ) twofifty -- at least 500 edits in main namspace on user_id = twofifty.actor_user join ( select actor_user, count(*) cnt from revision_userindex join actor_revision on rev_actor = actor_id join page on page_id = rev_page where rev_timestamp > '20210104000000' -- last 12 months leading to nomination start date and rev_timestamp < '20210705000000' group by actor_user having count(*) >= 15 ) onehundred -- at least 100 edits in the main namespace in the last six months leading to the nomination start date on user_id = onehundred.actor_user left join ( select ug_user from user_groups where ug_group = 'bot' ) bots on bots.ug_user = user_id where bots.ug_user is null order by user_name
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...