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
.
Toggle Highlighting
SQL
#USE stopthisrun; USE commonswiki_p; SELECT CONCAT('# [[:Category:', REPLACE(p1.page_title,'_',' '), ']]') AS cat1, CONCAT('→ [[:Category:', REPLACE(p2.page_title,'_',' '), ']]') AS cat2, CONCAT('→ [[:Category:', REPLACE(p3.page_title,'_',' '), ']]') AS cat3 FROM page p1 INNER JOIN templatelinks tl1 ON tl1.tl_from = p1.page_id AND tl1.tl_namespace = 10 AND tl1.tl_title IN ('Category_redirect', 'Cat_redirect', 'Cat-red', 'Cat-redirect', 'Category_Redirect', 'Categoryredirect', 'Catredir', 'Catredirect', 'Redirect_cat', 'Redirect_category', 'See_cat', 'Seecat') AND NOT EXISTS (SELECT 1 FROM categorylinks WHERE cl_from = p1.page_id AND cl_to IN ('Taxon_categories', 'No_more_recognized_taxon')) INNER JOIN pagelinks pl1 ON pl1.pl_from = p1.page_id AND pl1.pl_namespace = 14 INNER JOIN page p2 ON p2.page_title = pl1.pl_title AND p2.page_namespace = 14 INNER JOIN templatelinks tl2 ON tl2.tl_from = p2.page_id AND tl2.tl_namespace = 10 AND tl2.tl_title IN ('Category_redirect', 'Cat_redirect', 'Cat-red', 'Cat-redirect', 'Category_Redirect', 'Categoryredirect', 'Catredir', 'Catredirect', 'Redirect_cat', 'Redirect_category', 'See_cat', 'Seecat') INNER JOIN pagelinks pl2 ON pl2.pl_from = p2.page_id AND pl2.pl_namespace = 14 INNER JOIN page p3 ON p3.page_title = pl2.pl_title AND p3.page_namespace = 14 WHERE p1.page_namespace = 14 #whitelist AND p1.page_title NOT IN ('Administrative_buildings_in_Moldova', 'Architecture_of_Cyprus_by_period', 'Baillonius', 'Bars_in_Estonia', 'Belamcanda', 'Bumelia', 'Buses_in_Norway_by_city', 'Buses_in_the_United_Kingdom_by_region') AND p1.page_title NOT LIKE '1%_in_Ternopil_Oblast' AND p1.page_title NOT LIKE '18th-century_%_the_United_Kingdom' AND p1.page_title NOT LIKE 'Adolf_%' #temp AND p1.page_title NOT LIKE 'Aporocactus%' AND p1.page_title NOT LIKE 'Architecture_of_%' AND p1.page_title NOT LIKE 'Art_of_%_by_city' AND p1.page_title NOT LIKE 'Banisters_in_%' AND p1.page_title NOT LIKE 'Buildings_in_%' AND p1.page_title NOT LIKE 'Pubs_in_%' GROUP BY cat1 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...