SQL
AخA
use commonswiki_p;
SELECT iwl_title, 'P373', CONCAT("\"", REPLACE(page_title, "_", " "), "\""), 'S143', 'Q24731821'
FROM page
JOIN categorylinks C1 ON C1.cl_from=page_id AND C1.cl_to='Creator_templates_with_Wikidata_link:_item_missing_homecat'
JOIN iwlinks ON iwl_from=page_id AND iwl_prefix='wikidata' AND iwl_title LIKE 'Q%'
WHERE
page_namespace=100 AND
page_is_redirect=0 AND
NOT EXISTS (
SELECT * FROM categorylinks C2
WHERE page_id = C2.cl_from AND C2.cl_to="Category:Creator_templates_with_non-matching_home_categories"
)
LIMIT 500;
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.