SQL
AخA
SELECT COUNT(IF (log_id IS NULL, 1, NULL)) AS '# created before creation log', COUNT(*) AS 'total'
FROM page
LEFT JOIN templatelinks t1
ON t1.tl_namespace=10 AND t1.tl_title=page_title
LEFT JOIN logging_logindex
ON log_type='create' AND log_namespace=10 AND log_title=page_title
WHERE page_namespace=10
AND t1.tl_from IS NULL
AND page_is_redirect=0
AND page_title NOT LIKE '%/sandbox'
AND page_title NOT LIKE '%/testcases'
AND page_title NOT LIKE '%/doc'
AND NOT EXISTS (SELECT 1 FROM templatelinks t2
WHERE t2.tl_from=page_id
AND t2.tl_namespace=10
AND t2.tl_title IN ('Require_subst', 'Subst_only', 'Substed', 'Substitute',
'Substituted', 'Substme', 'Substonly')
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.