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
Peter Bowman
.
Resultset 1: count of unflagged (FlaggedRevs) pages within the categories "importSV", "importIA", "jidyszbot" and "importCStematyczny" in the main namespace. Resultset 2: same as above, but it doesn't take into account pages with non-bot edits in history. Resultset 3: list of pages to work on from resultset 2.
Toggle Highlighting
SQL
USE plwiktionary_p; SELECT cl_to = IFNULL(cl_to, "Total") AS category, COUNT(page_title) AS unflagged FROM page JOIN categorylinks ON cl_from = page_id AND cl_to IN ("importSV", "importIA", "jidyszbot") WHERE NOT EXISTS (SELECT fp_page_id FROM flaggedpages WHERE fp_page_id = page_id) GROUP BY ROLLUP(cl_to) ORDER BY unflagged DESC; SELECT cl_to AS category, COUNT(DISTINCT page_title) AS unflagged FROM page JOIN categorylinks ON cl_from = page_id AND cl_to IN ("importSV", "importIA", "jidyszbot") JOIN revision r ON rev_page = page_id WHERE NOT EXISTS (SELECT fp_page_id FROM flaggedpages WHERE fp_page_id = page_id) AND EXISTS ( SELECT NULL FROM user LEFT JOIN user_groups ON ug_user = user_id AND ug_group = "bot" WHERE user_id = rev_user HAVING MAX(ug_group IS NULL) = 0 ) GROUP BY cl_to ORDER BY unflagged DESC; SELECT page_title, cl_to AS category, page_latest FROM page JOIN categorylinks ON cl_from = page_id AND cl_to IN ("importSV", "importIA", "jidyszbot") JOIN revision ON rev_page = page_id WHERE NOT EXISTS (SELECT fp_page_id FROM flaggedpages WHERE fp_page_id = page_id) GROUP BY page_title HAVING MAX(rev_user_text NOT IN ( "AlkamidBot", "Beau.bot", "EquadusBot", "JAnDbot", "MastiBot", "Olafbot", "PBbot", "YS-Bot", "CommonsDelinker", "AvocatoBot", "CarsracBot", "CompBot", "DerbethBot", "Golem", "KamikazeBot", "Luckas-bot", "Makecat-bot", "RobotGMwikt", "Tawbot~plwiktionary", "Tsca.bot", "YarluBot", "Interwicket", "Conversion script", "Template namespace initialisation script" )) = 0;
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...