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 pl_title AS TargetDab, CONCAT(CASE pl_from_namespace WHEN 0 THEN "" WHEN 10 THEN "Template:" WHEN 14 THEN "Category:" WHEN 100 THEN "Portal:" ELSE CONVERT(pl_from_namespace, CHAR) END, Pa.page_title) AS LinkedFrom FROM pagelinks JOIN page Pd ON page_namespace=0 AND page_title=pl_title JOIN page_props ON pp_page=Pd.page_id AND pp_propname="disambiguation" JOIN page Pa ON Pa.page_id=pl_from AND Pa.page_is_redirect=0 WHERE pl_from_namespace IN (0,10,14,100) AND pl_namespace=0 AND pl_title REGEXP "_(station|line|metro|railway)\\b" AND NOT pl_title REGEXP "_\\(disambiguation\\)" ORDER BY TargetDab, pl_from_namespace, LinkedFrom
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...