SQL
x
USE fawiki_p;
SELECT page_title
FROM page JOIN categorylinks AS frst ON cl_from = page_id
WHERE page_namespace = 0
AND page_is_redirect = 0
AND page_title LIKE "آتشکده%"
AND frst.cl_to = 'آثار_ملی_ایران'
AND page_id NOT IN (
SELECT cl_from
FROM categorylinks AS scnd
WHERE scnd.cl_to LIKE "آتشکده%"
)
ORDER BY 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.