Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
Fork of
test2
by
Achim55
This query is marked as a draft
This query has been published
by
Achim55
.
Toggle Highlighting
SQL
#USE stop; USE commonswiki_p; SET @tltitle = 'Category_redirect'; SELECT p1.page_title, pl_title FROM page p1 INNER JOIN categorylinks cl1 ON cl1.cl_from = p1.page_id AND cl1.cl_to = 'Category_redirects' INNER JOIN templatelinks tl1 ON tl1.tl_from = p1.page_id AND tl1.tl_from_namespace = 14 AND tl1.tl_namespace = 10 AND tl1.tl_title = @tltitle INNER JOIN pagelinks ON pl_from = p1.page_id AND pl_from_namespace = 14 AND pl_namespace = 14 #AND (COUNT(pl_from = p1.page_id) = 1) INNER JOIN page p2 ON p2.page_title = pl_title INNER JOIN categorylinks cl2 ON cl2.cl_from = p2.page_id AND cl2.cl_to = 'Category_redirects' INNER JOIN templatelinks tl2 ON tl2.tl_from = p2.page_id AND tl2.tl_from_namespace = 14 AND tl2.tl_namespace = 10 AND tl2.tl_title = @tltitle WHERE p1.page_namespace = 14 AND p2.page_namespace = 14 #AND p1.page_title NOT LIKE 'Cities%' GROUP BY p1.page_title HAVING COUNT(p1.page_title) = 1 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...