This query is marked as a draft This query has been published by Isaac (WMF).

SQL

x
 
SELECT *, reverted_edit_count/edit_count*100 as percent_reverted
FROM (
  SELECT
    LEFT(rev_timestamp, 6) AS month,
    count(1) AS edit_count,
    count(t.reverted_rev_id) AS reverted_edit_count
  FROM change_tag
  LEFT JOIN change_tag_def on ct_tag_id=ctd_id
  LEFT JOIN revision on ct_rev_id=rev_id
  LEFT JOIN page on rev_page=page_id
  
  LEFT JOIN (
    SELECT ct_rev_id as reverted_rev_id
    FROM change_tag
    LEFT JOIN change_tag_def on ct_tag_id=ctd_id
    WHERE ctd_name='mw-reverted'
  ) t ON ct_rev_id=reverted_rev_id
  WHERE ct_rev_id is not null
  AND page_namespace = 0
  GROUP BY LEFT(rev_timestamp, 6)
) y
ORDER BY month ASC
By running queries you agree to the Cloud Services Terms of Use and you irrevocably agree to release your SQL under CC0 License.
All SQL code is licensed under CC0 License.

Checking query status...