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; -- Step 1: Count the total edits made by the editor in the given time period SELECT COUNT(*) AS total_edits FROM revision JOIN actor ON revision.rev_actor = actor.actor_id WHERE actor.actor_name = @editor_name AND revision.rev_timestamp BETWEEN @start_date AND @end_date; -- Step 2: Count the edits by the editor that were reverted SELECT COUNT(DISTINCT reverted.rev_id) AS reverted_edits FROM revision AS reverted JOIN comment ON reverted.rev_comment_id = comment.comment_id JOIN revision AS reverting ON reverting.rev_comment_id = comment.comment_id JOIN actor ON reverted.rev_actor = actor.actor_id WHERE actor.actor_name = @editor_name AND reverted.rev_timestamp BETWEEN @start_date AND @end_date AND comment.comment_text LIKE '%revert%';
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...