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
Certes
.
Toggle Highlighting
SQL
SELECT P1.page_title, P2.page_title FROM categorylinks CL JOIN page P1 ON P1.page_namespace = 100 AND P1.page_id = CL.cl_from AND P1.page_is_redirect = 0 AND P1.page_title NOT LIKE "%/%" JOIN page Pm ON Pm.page_namespace = 0 AND Pm.page_title = P1.page_title and Pm.page_is_redirect = 1 JOIN redirect R ON R.rd_from = Pm.page_id AND R.rd_namespace = 0 AND R.rd_title NOT LIKE "%/%" JOIN page P2 ON P2.page_namespace = 100 AND P2.page_title = R.rd_title AND P2.page_is_redirect=0 WHERE CL.cl_to = "All_portals" ORDER BY P1.page_title, P2.page_title
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...