SQL
AخA
WITH hof AS (
SELECT p.page_id, p.page_title
FROM page p
WHERE p.page_namespace = 0
AND p.page_title != 'Green_Bay_Packers_Hall_of_Fame'
AND p.page_id IN (
SELECT cl.cl_from
FROM categorylinks cl
WHERE cl.cl_to = 'Green_Bay_Packers_Hall_of_Fame'
)
)
SELECT CONCAT('[[', h.page_title, ']]')
FROM hof h
WHERE h.page_id NOT IN (
SELECT el.el_from
FROM externallinks el
WHERE
el.el_from IN (SELECT h2.page_id FROM hof h2)
AND (
el.el_to_domain_index REGEXP '^https?:\/\/com\.packers\.(?:www\.)?$'
AND (el.el_to_path LIKE '/history/hof/%' OR el.el_to_path LIKE '/history/hall-of-famers/%')
)
OR
(
el.el_to_domain_index REGEXP '^https?:\/\/org\.archive\.web\.(?:www\.)?$'
AND (el.el_to_path LIKE '%packers.com/history/hof/%' OR el.el_to_path LIKE '%packers.com/history/hall-of-famers/%')
)
)
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.