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, terms2.term_type FROM wb_terms AS terms1 JOIN wb_terms AS terms2 USING (term_full_entity_id, term_language, term_type, term_text) WHERE terms1.term_type = 'alias' AND terms1.term_row_id <> terms2.term_row_id LIMIT 10000; /* SELECT terms1.term_full_entity_id, terms1.term_language, terms1.term_text, terms2.term_type 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 = 'label' OR ( terms2.term_type = 'alias' AND terms1.term_row_id <> terms2.term_row_id ) ) LIMIT 2000; /* SELECT term_full_entity_id, term_language, term_text, COUNT(*) FROM wb_terms WHERE term_type = 'alias' GROUP BY term_full_entity_id, term_language, term_text HAVING COUNT(*) > 1 ORDER BY COUNT(*) DESC, term_language, term_full_entity_id, term_text LIMIT 500; */
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...