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
.
verlinkte Weiterleitungen mit Anzahl Verlinkungen
Toggle Highlighting
SQL
SELECT CONCAT('[{{fullurl:', REPLACE(WL.page_title, '_', ' '), '&redirect=no}} ', REPLACE(WL.page_title, '_', ' '), ']') AS Weiterleitung, CONCAT('[[', REPLACE(NACH.rd_title, '_', ' '), ']]') AS Ziel, COUNT(VONPAGE.page_id) AS "Anzahl Links auf Weiterleitung", CONCAT('[[', GROUP_CONCAT(REPLACE(VONPAGE.page_title, '_', ' ') SEPARATOR ']]<br />[[' LIMIT 5), ']]') AS "bis zu 5 Links auf die Weiterleitung" FROM page AS WL, pagelinks AS VON, redirect AS NACH, page AS VONPAGE WHERE WL.page_namespace = 0 AND WL.page_is_redirect = 1 AND VON.pl_title = WL.page_title AND VON.pl_namespace = WL.page_namespace AND VON.pl_from_namespace = 0 AND NACH.rd_from = WL.page_id AND NACH.rd_namespace = 0 AND VONPAGE.page_id = VON.pl_from AND NOT EXISTS (SELECT 1 # ich nehme noch die Weiterleitungen mit PD und ND raus FROM templatelinks, linktarget WHERE tl_from = WL.page_id AND tl_target_id = lt_id AND lt_namespace = 10 AND lt_title IN ('Personendaten', 'Normdaten', 'Wikidata-Weiterleitung') ) AND NOT EXISTS (SELECT 1 # und Weiterleitungen mit Kategorien ebenfalls raus FROM categorylinks WHERE cl_from = WL.page_id ) GROUP BY WL.page_id HAVING COUNT(VONPAGE.page_id) > 0 ORDER BY COUNT(VONPAGE.page_id) DESC
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...