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
Wurgl
.
Rotlinks in Artikeln (außer BKS) bei denen die ersten zwei Buchstaben im Klammerteil gleich sind wie vorhandener Blaulink
Toggle Highlighting
SQL
WITH pl AS (SELECT CONCAT(SUBSTRING_INDEX(pl_title, "_(", 1), "_(", LEFT(SUBSTRING_INDEX(pl_title, "_(", -1), 2)) AS pl_short, pl_from, pl_title FROM pagelinks LEFT JOIN templatelinks ON tl_from = pl_from AND tl_namespace = 10 AND tl_title = 'Begriffsklärung' LEFT JOIN page AS rotlink ON rotlink.page_namespace = 0 AND rotlink.page_title = pl_title WHERE tl_from IS NULL AND rotlink.page_id IS NULL AND pl_namespace = 0 AND pl_from_namespace = 0 AND pl_title LIKE "%\_(%" AND tl_from BETWEEN 0 AND 50000 ), ar AS (SELECT CONCAT(SUBSTRING_INDEX(page_title, "_(", 1), "_(", LEFT(SUBSTRING_INDEX(page_title, "_(", -1), 2)) AS ar_short, page_id AS ar_id, page_title as ar_title FROM page WHERE page_namespace = 0 AND page_title like "%\_(%" ) SELECT CONCAT("[[", REPLACE(article.page_title, "_", " "), "]]") AS "Artikel", CONCAT("[[", REPLACE(pl_title, "_", " "), "]]") AS "Rotlink", GROUP_CONCAT(CONCAT("[[", REPLACE(ar_title, "_", " "), "]]") SEPARATOR " • ") AS "Ähnliche Artikel" FROM pl, page AS article, ar WHERE ar.ar_short = pl_short AND article.page_id = pl_from GROUP BY article.page_title, pl_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...