SQL
AخA
USE fawiki_p;
SELECT p1.page_title
FROM page AS p1
WHERE p1.page_is_redirect = 0
AND p1.page_namespace = 0
AND p1.page_id NOT IN (
SELECT pp_page
FROM page_props
WHERE pp_propname = 'disambiguation'
)
AND NOT (
p1.page_title IN (
SELECT pl1.pl_title
FROM pagelinks AS pl1
WHERE pl1.pl_namespace = 0
AND pl1.pl_from_namespace = 0
AND pl1.pl_from NOT IN (
SELECT rd_from
FROM redirect
WHERE rd_namespace = 0
AND rd_title = page_title
)
)
OR (
p1.page_title IN (
SELECT rd_title
FROM redirect JOIN page AS p2 ON p2.page_id = rd_from JOIN pagelinks AS pl2 ON p2.page_title = pl2.pl_title
WHERE rd_namespace = 0
AND p2.page_is_redirect = 1
AND p2.page_namespace = 0
AND pl2.pl_namespace = 0
AND pl2.pl_from_namespace = 0
)
)
)
ORDER BY p1.page_title;
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.