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
Zero0000
.
Count all edits by reverts and reverted
Toggle Highlighting
SQL
-- Define the editor name, start date, and end date SET @editor_name = 'Zero0000'; -- Replace with the actual editor's username SET @start_date = '2023-01-01 00:00:00'; -- Replace with the desired start date SET @end_date = '2023-12-31 23:59:59'; -- Replace with the desired end date; -- Query to count total edits and edits with the mw-reverted tag SELECT COUNT(*) AS total_edits, SUM(CASE WHEN ctd.ctd_name = 'mw-reverted' THEN 1 ELSE 0 END) AS mw_reverted_edits FROM revision JOIN actor ON revision.rev_actor = actor.actor_id LEFT JOIN change_tag ON change_tag.ct_rev_id = revision.rev_id LEFT JOIN change_tag_def AS ctd ON change_tag.ct_tag_id = ctd.ctd_id WHERE actor.actor_name = @editor_name AND revision.rev_timestamp BETWEEN @start_date AND @end_date;
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...