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
Aram
.
Toggle Highlighting
SQL
-- USE the appropriate database USE wikidatawiki_p; -- Find categories that are available in most languages but not in ckbwiki, and count the number of languages SELECT enwiki.page_title AS category_title, COUNT(DISTINCT ll.ll_lang) AS language_count FROM page AS enwiki LEFT JOIN categorylinks AS cl ON cl.cl_from = enwiki.page_id LEFT JOIN ( SELECT ll_from, ll_lang FROM langlinks WHERE -- Exclude categories from ckbwiki ll_lang != 'ckb' ) AS ll ON ll.ll_from = enwiki.page_id WHERE enwiki.page_namespace = 14 AND -- Namespace for categories enwiki.page_title NOT IN ( SELECT page_title FROM page AS ckb_categories WHERE ckb_categories.page_namespace = 14 -- Namespace for categories ) AND ll.ll_from IS NOT NULL GROUP BY enwiki.page_title HAVING language_count > 5 -- Adjust the threshold for the minimum number of languages as needed LIMIT 100;
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...