SQL
AخA
SELECT @n := @n + 1 n,
CONCAT("[https://en.wikipedia.org/w/index.php?title=", `page_title`, "&redirect=no ", `page_title`, "]") as "Redirect", `pr_level` as "Protection Level"
FROM
`page`, (SELECT @n := 0) m
INNER JOIN `page_restrictions` ON page_title.`page_id`=page_restrictions.`pr_page`;
WHERE
`page_title` IN (
SELECT
REPLACE(`log_params`, " ", "_")
FROM
`logging_logindex`
WHERE
`log_type` = "protect"
AND `log_action` = "move_prot"
AND `log_params` IS NOT NULL
AND `log_namespace` = 0
)
AND `page_id` IN (
SELECT
`pr_page`
FROM
`page_restrictions`
WHERE
`pr_expiry` IN (NULL, "infinity")
)
AND `page_namespace` = 0
AND `page_is_redirect` = 1
ORDER BY `n` ASC
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.