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
Edgars2007
.
https://quarry.wmflabs.org/query/25112
Toggle Highlighting
SQL
select now(); /* wb_terms term_full_entity_id = pilnais id term_entity_type = 'item' wb_items_per_site ips_item_id - numerical id */ use wikidatawiki_p; SELECT REPLACE(tl_title, "_", " ") As tmpl, COUNT(*) As cnt, "" as QID FROM dewiki_p.templatelinks, dewiki_p.page_props As wpage_props WHERE tl_title like "Infobox%" and tl_from = wpage_props.pp_page AND wpage_props.pp_propname = "wikibase_item" AND wpage_props.pp_page = tl_from AND wpage_props.pp_value IN ( SELECT wb_terms.term_full_entity_id FROM page_props join page on page.page_namespace=0 and pp_sortkey=0 and page.page_id=page_props.pp_page join wb_terms on page.page_title=wb_terms.term_full_entity_id ) GROUP BY tl_title ORDER BY COUNT(tl_title) DESC
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...