Fork of Articles in both a mother and a daughter category (de) by Huji
This query is marked as a draft This query has been published by Huji.

SQL

AخA
 
SELECT DISTINCT
  p1.page_title,
  cl1.cl_to,
  cl2.cl_to as cl2
FROM page p1 -- article
JOIN categorylinks cl1 -- daughter
  ON p1.page_id = cl1.cl_from
  AND cl1.cl_to NOT LIKE '%صفحههای_ابهامزدایی%'
JOIN categorylinks cl2 -- mother
  ON p1.page_id = cl2.cl_from
  AND cl2.cl_to NOT LIKE '%صفحههای_ابهامزدایی%'
JOIN page p2 -- daughter cat page
  ON cl1.cl_to = p2.page_title
  AND p2.page_namespace = 14
JOIN categorylinks cl3
  ON p2.page_id = cl3.cl_from
  and cl3.cl_to = cl2.cl_to
WHERE
  p1.page_namespace = 0
  AND p1.page_is_redirect = 0
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...