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
Ponor
.
Reverted and total # of IP edits in a month
Toggle Highlighting
SQL
/*IP edits in a month: reverted and total*/ SET @from = "20220620"; SET @to = DATE_FORMAT(@from + INTERVAL 1 MONTH, "%Y%m%d"); /*SELECT @from, @to;*/ SELECT ct_tag_id in (58,59) as reverted, count(DISTINCT rev_id) FROM revision JOIN change_tag ON rev_id = ct_rev_id JOIN actor ON actor_id = rev_actor WHERE actor_user is NULL AND rev_timestamp BETWEEN @from AND @to GROUP BY reverted ; SELECT count(DISTINCT rev_id) FROM revision JOIN change_tag ON rev_id = ct_rev_id JOIN actor ON actor_id = rev_actor WHERE actor_user is NULL AND ct_tag_id in (58,59) /*revert and manual revert*/ AND rev_timestamp BETWEEN @from AND @to ; SELECT count(DISTINCT rev_id) FROM revision JOIN actor ON actor_id = rev_actor WHERE actor_user is NULL AND rev_timestamp BETWEEN @from AND @to ; /* SELECT *, ct_tag_id in (58,59) as reverted FROM revision, change_tag, actor, page WHERE rev_id = ct_rev_id AND actor_id = rev_actor AND page_id = rev_page AND actor_user is NULL AND ct_tag_id in (58,59) AND rev_timestamp BETWEEN @from AND @to ORDER BY rev_id DESC LIMIT 150 ; SELECT count(rev_id) FROM revision, actor, page WHERE actor_id = rev_actor AND page_id = rev_page AND actor_user is NULL AND rev_timestamp BETWEEN @from AND @to ORDER BY rev_id DESC LIMIT 150 ; */
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...