Fork of Redirects to user namespace by Wbm1058
This query is marked as a draft This query has been published by Wbm1058.

SQL

x
 
SELECT concat( p.page_namespace, ":", p.page_title, " redirects to [[", r.rd_title, "]]" )
AS "Cross-namespace redirects to mainspace"
FROM redirect r
INNER JOIN page p ON p.page_id = r.rd_from
WHERE p.page_namespace != 0
AND   p.page_namespace != 1
AND   p.page_namespace != 2
AND   p.page_namespace != 5
/*
AND   p.page_namespace != 3
AND   p.page_namespace != 4
AND   p.page_namespace != 12
*/
AND   p.page_namespace != 10
AND   p.page_namespace != 118
AND   r.rd_namespace = 0
#AND   p.page_title NOT LIKE '%/%'
ORDER by page_title;
SELECT COUNT(*)
AS "Total cross-namespace redirects to mainspace"
FROM redirect r
INNER JOIN page p ON p.page_id = r.rd_from
WHERE r.rd_namespace = 0
AND   p.page_namespace != 0;
By running queries you agree to the Cloud Services Terms of Use and you irrevocably agree to release your SQL under CC0 License.
All SQL code is licensed under CC0 License.

Checking query status...