SQL
AخA
SELECT p.page_id FROM page p
JOIN redirect r ON r.rd_from = p.page_id
WHERE p.page_namespace = 0
AND r.rd_namespace NOT IN (0, #Article
14, # Category
10, # Template
4, # Wikipedia
5, # Wikipedia talk - see Wikipedia:Redirects for discussion/Log/2012 July 16#Rules to consider/Confer in e-mail debate
12, # Help
100) # Portal
AND p.page_id NOT IN (36422437, 28376039, 5518477, 5518482, 26880825, # Five redirects to other namespaces which have been kept at [[WP:RFD]]
59320427) # Shortcut, looks acceptable.
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.