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
MarioGom
.
Toggle Highlighting
SQL
SET STATEMENT max_statement_time = 60 FOR SELECT -- Add the following columns... COUNT(CASE WHEN ct_tag_id = 59 THEN 1 END) as "reverted edits", COUNT(CASE WHEN 1=1 THEN 1 END) as "all" FROM revision as rev -- ... from all Wikipedia revisions JOIN change_tag ON change_tag.ct_rev_id = rev.rev_id -- Combines revision tags with the query JOIN actor ON rev.rev_actor = actor.actor_id WHERE -- rev.rev_deleted = 0 AND -- non-deleted revisions actor.actor_user IS NULL -- IP revisions -- AND change_tag.ct_tag_id = 59 -- mw-reverted AND rev_timestamp >= DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -1 YEAR), "%Y%m%d%H%i%s") -- minus 2 year -- AND rev_timestamp < DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -1 MONTH), "%Y%m%d%H%i%s") -- minus 1 month
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...