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( '# ', DATE_FORMAT(rev_timestamp, "%b %d %Y %h:%i %p"),' [https://commons.wikimedia.org/w/index.php?title=File:', rc.rc_title, '&action=history', ' ',c.comment_text,']' ) AS rev_link, -- a.actor_name,rev_id, COUNT(*) AS counter, CONCAT( '[[:File:', rc.rc_title, '|]]' ) AS 'file', CONCAT( 'https://commons.wikimedia.org/w/index.php?title=Special:Contributions/', a.actor_name) AS 'user', rev_timestamp FROM recentchanges_userindex AS rc -- revision_userindex JOIN actor_revision AS a ON a.actor_id = rev_actor JOIN user AS u ON u.user_id = a.actor_user AND u.user_editcount >= 9 AND u.user_editcount < 20 JOIN comment_revision AS c ON c.comment_id = rc.rc_comment_id AND c.comment_text LIKE 'Requesting rotation %' JOIN revision_userindex AS r ON r.rev_actor = rc.rc_actor 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 -- gu_home_db = 'commonswiki' -- (select comment.comment_text from comment where comment.comment_id = rev_comment_id) LIKE 'Requesting rotation %' GROUP BY rev_timestamp ORDER BY counter 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...