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
Achim55
.
...without redirects and disambigs
Toggle Highlighting
SQL
USE commonswiki_p; SELECT CONCAT ('# [[:Category:', page_title, ']]') AS emptycats FROM categorylinks RIGHT JOIN page ON cl_to = page_title WHERE page_namespace = 14 AND page_is_redirect = 0 AND page_is_new = 0 AND cl_to IS NULL AND page_title NOT LIKE 'Commons:%' AND page_title NOT LIKE 'Collection_of_The_New_Art_Gallery_Walsall%' AND page_title NOT LIKE 'Collection_of_West_Midlands_Police_Museum%' AND page_title NOT LIKE '%FOP_cases%' AND page_title NOT LIKE '%requiring_review%' AND page_title NOT LIKE '%to_be_classified' AND page_title NOT LIKE '%unidentified%' AND page_title NOT REGEXP '^[0-9]{2}' AND page_title NOT REGEXP '^(January|February|March|April|May|June|July|August|September|October|November|December)_' AND (SELECT MAX(rev_timestamp) FROM revision WHERE rev_page = page_id) < DATESUB(CURRENT_TIMESTAMP, INTERVAL 42 DAY) AND NOT EXISTS (SELECT 1 FROM categorylinks WHERE cl_from = page_id AND cl_to IN ('Categories_with_authority_control_data', 'Category_redirects', 'Commons_maintenance_content', 'Disambiguation', 'No_more_recognized_taxon', 'NoUploads', 'Taxon_categories')) AND NOT EXISTS (SELECT 1 FROM categorylinks WHERE cl_from = page_id AND cl_to REGEXP '^(Cultural_heritage|GLAM|IMO_|Protected_area|User_categor).*') # LIKE 'Protected_areas%') #AND NOT EXISTS (SELECT 1 FROM categorylinks # WHERE cl_from = page_id # AND cl_to LIKE 'Cultural_heritage%') #AND NOT EXISTS (SELECT 1 FROM categorylinks # WHERE cl_from = page_id # AND cl_to LIKE 'GLAM%') #AND NOT EXISTS (SELECT 1 FROM categorylinks # WHERE cl_from = page_id # AND cl_to LIKE 'User_categor%') AND NOT EXISTS (SELECT 1 FROM templatelinks WHERE tl_from = page_id AND tl_namespace = 10 AND tl_title IN ('CatDevelop', 'Category_for_discussion', 'Empty_category', 'Emptycat', 'EmptyCatGood', 'Global_maintenance_category')) AND NOT EXISTS (SELECT 1 FROM revision WHERE rev_page = page_id AND rev_user = 133084) ORDER BY page_title LIMIT 1000;
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...