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
Perhelion
.
Commons
Toggle Highlighting
SQL
-- Rotate requests by users with low editcount USE commonswiki_p; SET max_statement_time = 300; SELECT CONCAT( '# ', '[https://commons.wikimedia.org/w/index.php?title=File:', rc.rc_title, '&action=history', ' ', DATE_FORMAT(rev_timestamp, "%b %d %Y %h:%i %p"), ']' ) AS rev_link, -- a.actor_name,rev_id, -- COUNT(*), CONCAT( '[[:File:', rc.rc_title, '|]]' ) AS 'file', CONCAT( '[https://commons.wikimedia.org/w/index.php?title=Special:Contributions/', REPLACE(a.actor_name,' ','_'),' ',a.actor_name, ']' ) AS 'user', u.user_editcount, rev_timestamp FROM recentchanges_userindex AS rc -- revision_userindex JOIN actor_revision AS a ON a.actor_id = rc.rc_actor JOIN user AS u ON u.user_id = a.actor_user AND u.user_editcount < 16 JOIN revision AS r ON r.rev_page = rc.rc_cur_id AND r.rev_actor = rc.rc_actor JOIN comment_revision AS c ON c.comment_id = r.rev_comment_id AND c.comment_text LIKE 'Requesting rotation %' WHERE rc.rc_namespace = 6 AND rc.rc_type = 0 GROUP BY user ORDER BY rev_timestamp DESC -- LIMIT 200;
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...