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
.
This query lists pairs of portals (P1, P2) which share their names with a pair of mainspace pages where one (Pm) redirects to the other. Such portals may be duplicates.
Toggle Highlighting
SQL
SET STATEMENT max_statement_time = 20 FOR 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...