SQL
AخA
USE cswiki_p;
SELECT page_title, page_latest, templates.tl_title, templates.tl_namespace FROM (
SELECT DISTINCT tl_title, tl_namespace FROM templatelinks
WHERE tl_title NOT IN (SELECT page_title FROM page WHERE page_namespace = tl_namespace)
) AS templates
JOIN templatelinks AS all_templates ON all_templates.tl_title = templates.tl_title AND all_templates.tl_namespace = templates.tl_namespace
JOIN page ON page_id = tl_from
WHERE tl_from_namespace = 0
ORDER BY page_latest DESC;
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.