SQL
x
SELECT concat( "[https://en.wikipedia.org/w/index.php?title=User:{{urlencode:",
p.page_title, "}}&redirect=no User:", p.page_title, "] redirects to [[", r.rd_title, "]]" )
AS "Redirects from user, except user subpages, to mainspace"
FROM redirect r
INNER JOIN page p ON p.page_id = r.rd_from
WHERE p.page_namespace = 2
AND r.rd_namespace = 0
AND p.page_title NOT LIKE '%/%'
ORDER by page_title;
SELECT concat( "[https://en.wikipedia.org/w/index.php?title=User:{{urlencode:",
p.page_title, "}}&redirect=no User:", p.page_title, "]" )
AS "Userpages of nonexistent users"
FROM page p
LEFT JOIN `user`u ON u.user_name = REPLACE(SUBSTRING_INDEX(p.page_title, '/', 1), '_', ' ')
WHERE u.user_name IS NULL
AND page_is_redirect = 1
ORDER by page_title
LIMIT 500;
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.