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
Lucas Werkmeister (WMDE)
.
The properties used most commonly on Lexemes, anywhere on the page. (Strictly speaking, this includes properties used as the values of statements for property-type properties, but that should be exceedingly rare.)
Toggle Highlighting
SQL
USE `wikidatawiki_p`; SELECT `property_id`, `wbx_text` AS `property_label`, `count` FROM ( SELECT `pl_title` AS `property_id`, COUNT(DISTINCT `pl_from`) AS `count` FROM `pagelinks` WHERE `pl_from_namespace` = 146 -- Lexeme: AND `pl_namespace` = 120 -- Property: GROUP BY `pl_title` ) AS `properties` JOIN `wbt_property_terms` ON SUBSTRING(`property_id`, 2) = `wbpt_property_id` JOIN `wbt_term_in_lang` ON `wbpt_term_in_lang_id` = `wbtl_id` JOIN `wbt_text_in_lang` ON `wbtl_text_in_lang_id` = `wbxl_id` JOIN `wbt_text` ON `wbxl_text_id` = `wbx_id` WHERE `wbtl_type_id` = ( SELECT `wby_id` FROM `wbt_type` WHERE `wby_name` = "label" ) AND `wbxl_language` = "en" 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...