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
.
For https://phabricator.wikimedia.org/T94072
Toggle Highlighting
SQL
USE wikidatawiki_p; /* SELECT terms1.term_full_entity_id, terms1.term_language, terms1.term_text FROM wb_terms AS terms1, wb_terms AS terms2 WHERE terms1.term_full_entity_id = terms2.term_full_entity_id AND terms1.term_language = terms2.term_language AND terms1.term_text = terms2.term_text AND terms1.term_type = 'alias' AND terms2.term_type = 'alias' AND terms1.term_row_id <> terms2.term_row_id LIMIT 1; */ SELECT wbit_item_id, wbxl_language, wbx_text FROM wbt_item_terms JOIN wbt_term_in_lang AS Aterm ON wbit_term_in_lang_id = Aterm.wbtl_id JOIN wbt_term_in_lang AS Lterm ON wbit_term_in_lang_id = Lterm.wbtl_id JOIN wbt_type AS Ay ON Aterm.wbtl_type_id = Ay.wby_id JOIN wbt_type AS Ly ON Lterm.wbtl_type_id = Ly.wby_id JOIN wbt_text_in_lang ON Lterm.wbtl_text_in_lang_id = wbxl_id AND Aterm.wbtl_text_in_lang_id = wbxl_id JOIN wbt_text ON wbxl_text_id = wbx_id WHERE Ay.wby_name = 'alias' AND Ly.wby_name = 'label' LIMIT 1;
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...