Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
This query is marked as a draft
This query has been published
by
Jheald
.
Toggle Highlighting
SQL
/* Suggest items to be linked to creator templates based on terms (label and alias) */ USE commonswiki_p; SELECT DISTINCT(CONCAT('* [[:C:Creator:', cp.page_title, ']] - {{Q|', term_entity_id, '}}')) FROM page AS cp JOIN categorylinks AS nowd ON cp.page_id=nowd.cl_from AND nowd.cl_type='page' AND nowd.cl_to='Creator_templates_without_Wikidata_link' JOIN wikidatawiki_p.wb_terms ON cp.page_title=REPLACE(term_text, ' ', '_') AND term_entity_type='item' AND (term_type='label' OR term_type='alias') WHERE cp.page_namespace=100 AND cp.page_is_redirect=0 ORDER BY cp.page_title, term_entity_id ASC;
By running queries you agree to the
Cloud Services Terms of Use
and you irrevocably agree to release your SQL under
CC0 License
.
Submit Query
Stop Query
All SQL code is licensed under
CC0 License
.
Checking query status...