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 Pr.page_title AS Redirect, Pa.page_title AS Target FROM linktarget JOIN templatelinks ON tl_target_id=lt_id AND tl_from_namespace=0 JOIN redirect ON rd_from=tl_from AND rd_namespace=0 AND rd_title REGEXP "^[^\\W_]+_[^\\W_]+$" AND rd_title NOT REGEXP "^(The_|\\d{4}_|List_of_)" JOIN page Pa ON Pa.page_namespace=0 AND Pa.page_title=rd_title JOIN page Pt ON Pt.page_namespace=1 AND Pa.page_title=rd_title LEFT JOIN categorylinks CLa ON CLa.cl_type="page" AND CLa.cl_from=Pa.page_id AND CLa.cl_to REGEXP "Living_people|_births|_deaths|ictional_characters|eople|isambiguation|names|-century" LEFT JOIN categorylinks CLt ON CLt.cl_type="page" AND CLt.cl_from=Pt.page_id AND CLa.cl_to REGEXP "iograph" JOIN page Pr ON Pr.page_id=tl_from AND Pr.page_namespace=0 AND Pr.page_title REGEXP "^[^\\W_]+,_[^\\W_]+$" AND Pr.page_title = REGEXP_REPLACE(Pa.page_title, '^(.*)_(.*)$', '\\2,_\\1') WHERE lt_namespace=10 AND lt_title="R_from_sort_name" AND cl_from IS NULL 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...