Fork of
zhwiki: redirect from draft to article
by Xiplus
This query is marked as a draft
This query has been published
by Xiplus.
SQL
AخA
USE zhwiki_p;
SELECT CONCAT("[[{{ns:", page_namespace, "}}:", page_title, "]]") AS "from", CONCAT("[[{{ns:", rd_namespace, "}}:", rd_title, "]]") AS "to"
FROM (
SELECT * FROM redirect
WHERE rd_namespace = 2 OR rd_namespace = 3
) rd
LEFT JOIN page ON rd_from = page_id
WHERE page_namespace != 2 AND page_namespace != 3
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.