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 now() AS timestamp; SELECT CONCAT('# [[:Category:', REPLACE(page_title,'_',' '), ']]') AS emptycats FROM categorylinks RIGHT JOIN page ON cl_to = page_title AND page_namespace = 14 AND page_is_redirect = 0 AND page_title NOT REGEXP '^(Commons\:|Collection_of_|FoP\-|IMO_|Images_from_Wiki_Loves_|Images_.*\/Reports\/|Naturschutzgebiet|RCE_suggested\:)' AND page_title NOT REGEXP '(Berlin|check_needed|Expedition_Wikipedia|FOP_cases|requiring_review|to_be_classified|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)_' WHERE cl_to IS NULL AND ((page_len = 0) OR (DATEDIFF(CURRENT_TIMESTAMP, (SELECT MAX(rev_timestamp) FROM revision WHERE rev_page = page_id)) > 183)) AND NOT EXISTS (SELECT 1 FROM categorylinks WHERE cl_from = page_id AND cl_to = 'Categories_with_authority_control_data') AND NOT EXISTS (SELECT 1 FROM categorylinks WHERE cl_from = page_id AND cl_to = 'Category_redirects') AND NOT EXISTS (SELECT 1 FROM categorylinks WHERE cl_from = page_id AND cl_to = 'Commons_maintenance_content') 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 = 'Disambiguation') 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 = 'Hidden_categories') #temp AND NOT EXISTS (SELECT 1 FROM categorylinks WHERE cl_from = page_id AND cl_to = 'Images_for_cleanup') AND NOT EXISTS (SELECT 1 FROM categorylinks WHERE cl_from = page_id AND cl_to LIKE 'Images_from_Wiki_Loves_%') AND NOT EXISTS (SELECT 1 FROM categorylinks WHERE cl_from = page_id AND cl_to = 'No_more_recognized_taxon') AND NOT EXISTS (SELECT 1 FROM categorylinks WHERE cl_from = page_id AND cl_to = 'NoUploads') AND NOT EXISTS (SELECT 1 FROM categorylinks WHERE cl_from = page_id AND cl_to LIKE 'Protected_area%') AND NOT EXISTS (SELECT 1 FROM categorylinks WHERE cl_from = page_id AND cl_to = 'Taxon_categories') AND NOT EXISTS (SELECT 1 FROM categorylinks WHERE cl_from = page_id AND cl_to LIKE 'User_categories%') AND NOT EXISTS (SELECT 1 FROM templatelinks WHERE tl_from = page_id AND tl_namespace = 10 AND tl_title = 'CatDevelop') AND NOT EXISTS (SELECT 1 FROM templatelinks WHERE tl_from = page_id AND tl_namespace = 10 AND tl_title = 'Category_for_discussion') AND NOT EXISTS (SELECT 1 FROM templatelinks WHERE tl_from = page_id AND tl_namespace = 10 AND tl_title = 'Empty_category') AND NOT EXISTS (SELECT 1 FROM templatelinks WHERE tl_from = page_id AND tl_namespace = 10 AND tl_title = 'Emptycat') AND NOT EXISTS (SELECT 1 FROM templatelinks WHERE tl_from = page_id AND tl_namespace = 10 AND tl_title = 'EmptyCatGood') AND NOT EXISTS (SELECT 1 FROM templatelinks WHERE tl_from = page_id AND tl_namespace = 10 AND tl_title = 'Fotothek_category_header') AND NOT EXISTS (SELECT 1 FROM templatelinks WHERE tl_from = page_id AND tl_namespace = 10 AND tl_title = 'Global_maintenance_category') AND NOT EXISTS (SELECT 1 FROM templatelinks WHERE tl_from = page_id AND tl_namespace = 10 AND tl_title = 'Local_maintenance_category') AND NOT EXISTS (SELECT 1 FROM templatelinks WHERE tl_from = page_id AND tl_namespace = 10 AND tl_title = 'NoFoP') AND NOT EXISTS (SELECT 1 FROM templatelinks WHERE tl_from = page_id AND tl_namespace = 10 AND tl_title = 'Prospective_category') AND NOT EXISTS (SELECT 1 FROM templatelinks WHERE tl_from = page_id AND tl_namespace = 10 AND tl_title = 'WDPA') AND NOT EXISTS (SELECT 1 FROM revision WHERE rev_page = page_id AND rev_user IN (108410, 133084)) #temp 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...