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
GFJ
.
Based on SQL by https://quarry.wmflabs.org/Achim55.
Toggle Highlighting
SQL
USE commonswiki_p; SELECT CONCAT('# [[:Category:', REPLACE(c.page_title,'_',' '), ']]', IF (c.page_len < 5," → '''blank'''",'')) FROM (SELECT * FROM categorylinks RIGHT JOIN page ON cl_to = page_title WHERE cl_to IS NULL AND page_namespace = 14 AND page_is_redirect = 0 AND page_title NOT LIKE 'FoP-%' AND page_title NOT LIKE 'FOP-%' AND page_title NOT REGEXP '(check_needed|Expedition_Wikipedia|FOP_cases|requiring_review|to_be_categorised|to_be_checked|to_be_classified|unidentified)' ) AS c LEFT JOIN (SELECT cl_from FROM categorylinks WHERE cl_to IN ('Broken_category_redirects', 'Categories_with_authority_control_data') OR cl_to LIKE 'FoP-%' ) AS cl ON cl.cl_from = c.page_id LEFT JOIN (SELECT tl_from FROM templatelinks WHERE tl_namespace = 10 AND tl_title IN ('CatDevelop', 'Category_for_discussion', 'Empty_category', 'Emptycat', 'EmptyCatGood', 'Global_maintenance_category', 'Infobox_Wikidata', 'Infobox_wikidata', 'Local_maintenance_category', 'NoFoP', 'On_Wikidata', 'Prospective_category', 'Wikidata', 'Wikidata_box', 'Wikidata_Infobox', 'Wikidata_infobox', 'Wdbox') ) AS tl ON tl.tl_from = c.page_id WHERE cl.cl_from IS NULL AND tl.tl_from IS NULL AND ((c.page_len < 5) #blank page OR (DATEDIFF(CURRENT_TIMESTAMP, (SELECT MAX(rev_timestamp) FROM revision WHERE rev_page = c.page_id)) > 274) #last edit >9 months );
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...