Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
Fork of
Edit count LGBT studies articles summary
by
BilledMammal
This query is marked as a draft
This query has been published
by
BilledMammal
.
Toggle Highlighting
SQL
WITH ids AS (SELECT cl_from FROM categorylinks WHERE cl_to = "Living_people"), article AS (SELECT page_id FROM ids JOIN page ON page_id = cl_from WHERE page_namespace = 0), counts AS (SELECT edits, reverted_edits, user_editcount AS total_edits FROM user RIGHT JOIN (SELECT actor_user, actor_name, COUNT(*) AS edits, COUNT(ct_tag_id) AS reverted_edits FROM article JOIN revision ON page_id = rev_page JOIN actor ON actor_id = rev_actor LEFT JOIN change_tag ON ct_rev_id = rev_id AND (ct_tag_id = 582 OR ct_tag_id = 590) WHERE rev_timestamp > 20220000000000 GROUP BY actor_id) editors ON actor_user = user_id) SELECT SUM(edits) as "All Edits", SUM(reverted_edits) as "All Reverts", SUM(CASE WHEN total_edits > 499 THEN edits ELSE 0 END) as "EXC Edits", SUM(CASE WHEN total_edits > 499 THEN reverted_edits ELSE 0 END) as "EXC Reverts", SUM(CASE WHEN total_edits < 500 THEN edits ELSE 0 END) as "non-EXC Edits", SUM(CASE WHEN total_edits < 500 THEN reverted_edits ELSE 0 END) as "non-EXC Reverts", SUM(CASE WHEN total_edits > 9 THEN edits ELSE 0 END) as "Auto Edits", SUM(CASE WHEN total_edits > 9 THEN reverted_edits ELSE 0 END) as "Auto Reverts", SUM(CASE WHEN total_edits < 10 THEN edits ELSE 0 END) as "Non-Auto Edits", SUM(CASE WHEN total_edits < 10 THEN reverted_edits ELSE 0 END) as "Non-Auto Reverts", SUM(CASE WHEN total_edits > 9 AND total_edits < 500 THEN edits ELSE 0 END) as "Auto, non-EXC Edits", SUM(CASE WHEN total_edits > 9 AND total_edits < 500 THEN reverted_edits ELSE 0 END) as "Auto, non-EXC Reverts" FROM counts
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...