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
.
Toggle Highlighting
SQL
USE wikidatawiki_p; SELECT labels1.term_full_entity_id AS x,# CONCAT(labels1.term_text," (",GROUP_CONCAT(labels1.term_language),")"), labels2.term_full_entity_id AS y#, CONCAT(labels2.term_text, " (",GROUP_CONCAT(labels2.term_language),")") FROM (SELECT * FROM pagelinks WHERE pl_title IN ("Q16521","Q310890") AND pl_namespace = 0) AS taxa1 JOIN page AS items1 ON items1.page_id = pl_from JOIN wb_terms AS labels1 ON labels1.term_full_entity_id = items1.page_title AND items1.page_namespace = 0 AND labels1.term_type IN ("label","alias") JOIN wb_terms AS labels2 ON labels2.term_text = labels1.term_text AND labels2.term_type IN ("label","alias") JOIN page AS items2 ON items2.page_title = labels2.term_full_entity_id AND items2.page_namespace = 0 JOIN (SELECT * FROM pagelinks WHERE pl_title IN ("Q16521","Q310890") AND pl_namespace = 0) AS taxa2 ON taxa2.pl_from = items2.page_id WHERE labels1.term_full_entity_id <> labels2.term_full_entity_id 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...