This query is marked as a draft This query has been published by JJMC89.

SQL

AخA
 
select  concat('[[', page_title, ']]') Redirect, concat('[[{{nse:', rd_namespace, '}}:', rd_title, ']]') Target
from    redirect r
        inner join
        page p
        on r.rd_from = p.page_id
where   page_namespace = 0
and     rd_namespace not in (0, 4, 10, 12, 14, 100)
and     not exists (select 1 from page_restrictions where pr_page = r.rd_from and pr_type = 'edit' and pr_level = 'sysop')
;
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...