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
SELECT sitelinks.ips_site_page, CONCAT("Q",epp2.epp_entity_id), CONCAT("Q",epp1.epp_entity_id), COUNT(ips_site_page) FROM cswiki_p.page JOIN (SELECT * FROM wikidatawiki_p.wb_terms WHERE term_language = "cs" AND term_type = "label" AND term_entity_type = "item") AS labels ON page_title = labels.term_text JOIN wikidatawiki_p.wb_entity_per_page AS epp1 ON epp1.epp_entity_id = labels.term_entity_id JOIN (SELECT * FROM wikidatawiki_p.pagelinks WHERE pl_title = "Q16521") AS links ON links.pl_from = epp1.epp_page_id JOIN (SELECT * FROM wikidatawiki_p.wb_items_per_site WHERE ips_site_id = "cswiki") AS sitelinks ON sitelinks.ips_site_page = CONCAT("Kategorie:",page_title) JOIN wikidatawiki_p.wb_entity_per_page AS epp2 ON epp2.epp_entity_id = sitelinks.ips_item_id WHERE page_namespace = 14 GROUP BY page_title HAVING COUNT(ips_site_page) < 5;
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...