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(*) AS counter, u.user_editcount, 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', 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 -- JOIN revision_actor_temp ON revactor_rev = r.rev_id -- to get revactor_page = revision.rev_page -- JOIN revision_userindex AS r ON r.rev_actor = rc.rc_actor AND r.rev_page = revactor_page -- AND r.rev_comment_id = rc.rc_comment_id -- JOIN page ON rev_page = page_id AND page_namespace = 6 AND page_is_redirect = 0 WHERE rc.rc_namespace = 6 AND rc.rc_type = 0 AND c.comment_text LIKE 'Requesting rotation %' -- gu_home_db = 'commonswiki' -- (select comment.comment_text from comment where comment.comment_id = rev_comment_id) LIKE 'Requesting rotation %' 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...