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
.
Toggle Highlighting
SQL
SET @StartCat = 'Vorlage:Datenbanklink_Sport'; SET @MaxCatTiefe = 99; WITH RECURSIVE Cat AS ( SELECT page_title, page_id, 0 AS level FROM page WHERE page_title = REPLACE(@StartCat, ' ', '_') AND page_namespace = 14 UNION SELECT SubCat.page_title, SubCat.page_id, Cat.level + 1 FROM page AS SubCat, categorylinks, Cat WHERE SubCat.page_namespace = 14 AND cl_from = SubCat.page_id AND cl_to = Cat.page_title AND cl_type = 'subcat' AND Cat.level < @MaxCatTiefe ) SELECT DISTINCT R.page_title AS "Weiterleitung", rd_title AS "Weiterleitungsziel" FROM page AS R, page AS V, redirect, linktarget, categorylinks, Cat WHERE R.page_namespace = 10 AND R.page_is_redirect = 1 AND rd_from = R.page_id AND lt_title = R.page_title AND lt_namespace = R.page_namespace AND V.page_title = rd_title AND V.page_namespace = rd_namespace AND cl_from = V.page_id AND cl_to = Cat.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...