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
Matěj Suchánek
.
TODO: case insensitivity, underscores
Toggle Highlighting
SQL
USE wikidatawiki_p; SELECT sitelinks.ips_site_page, CONCAT("Q",items.ips_item_id), CONCAT("Q",epp_entity_id), COUNT(items.ips_site_page) FROM ( SELECT * FROM wb_terms, cswiki_p.page WHERE page_namespace = 14 AND term_language = "cs" AND term_type IN ("label","alias") AND term_entity_type = "item" AND LOWER(page_title) = LOWER(term_text) ) AS terms JOIN wb_entity_per_page ON epp_entity_id = terms.term_entity_id JOIN (SELECT * FROM pagelinks WHERE pl_title = "Q16521") AS links ON links.pl_from = epp_page_id JOIN (SELECT * FROM wb_items_per_site WHERE ips_site_id = "cswiki") AS sitelinks ON sitelinks.ips_site_page = CONCAT("Kategorie:",page_title) JOIN wb_items_per_site AS items ON items.ips_item_id = sitelinks.ips_item_id GROUP BY page_title HAVING COUNT(items.ips_site_page) < 6 ORDER BY terms.term_text;
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...