SQL
AخA
SELECT page.page_title,
GROUP_CONCAT(CONCAT('[[تصنيف:',REPLACE(categorylinks.cl_to, '_', ' '),']]') SEPARATOR ',') AS categories
FROM page
JOIN categorylinks ON page.page_id = categorylinks.cl_from
WHERE cl_to IN (
SELECT page.page_title
FROM page
JOIN templatelinks ON page.page_id = templatelinks.tl_from
JOIN linktarget ON templatelinks.tl_target_id = linktarget.lt_id
WHERE page.page_is_redirect = 0
AND page.page_namespace = 4
AND lt_title LIKE "تصنيف_قوالب"
)
AND page.page_namespace = 0
GROUP BY page.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.