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
Jura1
.
Toggle Highlighting
SQL
# test # See also https://upload.wikimedia.org/wikipedia/commons/f/f7/MediaWiki_1.24.1_database_schema.svg use wikidatawiki_p; #iswiki 52,675 ok #ocwiki 104,940 ok #ltwiki 199,102 ok #nowiki 522,767 ok #ptwiki 1,085,121 ok <1' #frwiki 1,977,105 ok 1' (700 with 50+ cats) #svwiki 2,267,557 ok 1' (68 with 50+cats) #enwiki 6,329,683 ok 150 (1774 with 50+cats) SELECT REPLACE(cl_to, "_", " ") As category_at_Wikipedia_1234567890_1234567890, CONCAT("Q",ips_item_id) AS QID, COUNT(*) As NumberOfItemsWithoutStatement FROM enwiki_p.categorylinks, enwiki_p.page_props As wpage_props, wb_items_per_site WHERE cl_from = wpage_props.pp_page AND wpage_props.pp_propname = "wikibase_item" AND wpage_props.pp_page = cl_from AND cl_type = "page" AND wpage_props.pp_value IN ( SELECT page_title FROM page, page_props, wb_entity_per_page, wb_items_per_site WHERE ips_site_id = "ptwiki" AND pp_page = epp_page_id AND pp_propname = "wb-claims" AND pp_sortkey = 0 #same as pp_value AND epp_entity_id = ips_item_id AND epp_entity_type = "item" AND page_id = pp_page) AND CONCAT("Category:", REPLACE(cl_to, "_", " ")) = ips_site_page AND ips_site_id = "enwiki" GROUP BY cl_to HAVING COUNT(*)>99 ORDER BY COUNT(*) 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...