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

SQL

AخA
 
SELECT sourcepage.page_title AS article,
  tl_title AS editnotice,
  CONCAT("https://en.wikipedia.org/wiki/", sourcepage.page_title) AS link
FROM templatelinks
INNER JOIN page templatepage ON templatepage.page_title = tl_title AND templatepage.page_namespace = tl_namespace
INNER JOIN page sourcepage ON sourcepage.page_id = tl_from
WHERE tl_from_namespace = 0
AND sourcepage.page_is_redirect = 0
AND tl_namespace = 10
AND EXISTS (
  SELECT 1
  FROM categorylinks
  WHERE cl_from = templatepage.page_id
  AND (
    cl_to = "Editnotice_templates"
    OR cl_to = "1RR-related_templates"
    OR cl_to = "Varieties_of_English_templates"
    OR cl_to = "Wikipedia_Did_you_know_editnotice_templates"
  )
  LIMIT 1
)
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...