Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
Fork of
Wikidata terms like item identifiers
by
Matěj Suchánek
This query is marked as a draft
This query has been published
by
Matěj Suchánek
.
Toggle Highlighting
SQL
USE wikidatawiki_p; SELECT DISTINCT wbx_text, wbxl_language, (SELECT wby_name FROM wbt_type WHERE wby_id = wbtl_type_id) AS wby_name FROM wbt_item_terms JOIN wbt_term_in_lang ON wbtl_id = wbit_term_in_lang_id JOIN wbt_text_in_lang ON wbxl_id = wbtl_text_in_lang_id #JOIN wbt_type ON wby_id = wbtl_type_id JOIN wbt_text ON wbx_id = wbxl_text_id WHERE (wbx_text LIKE "Q%" OR wbx_text LIKE "(Q%") AND wbx_text RLIKE "^\\(?Q[1-9][0-9]*\\)?$" AND wbx_text IN (CONCAT('Q', wbit_item_id), CONCAT('(Q', wbit_item_id, ')')) ORDER BY wbxl_language;
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...