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 CONCAT("Q",labels1.term_full_entity_id), CONCAT(labels1.term_text," (",GROUP_CONCAT(labels1.term_language),")"), CONCAT("Q",labels2.term_full_entity_id), CONCAT(labels2.term_text, " (",GROUP_CONCAT(labels2.term_language),")") FROM (SELECT * FROM pagelinks WHERE pl_title IN ("Q16521","Q310890") AND pl_namespace = 0 AND pl_from_namespace = 0) AS taxa1 JOIN page AS items1 ON items1.page_id = pl_from JOIN (SELECT * FROM wb_terms WHERE term_type IN ("label","alias") AND term_entity_type = "item") AS labels1 ON labels1.term_full_entity_id = items1.page_title AND items1.page_namespace = 0 JOIN (SELECT * FROM wb_terms WHERE term_type IN ("label","alias") AND term_entity_type = "item") AS labels2 ON labels2.term_text = labels1.term_text 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 AND pl_from_namespace = 0) AS taxa2 ON taxa2.pl_from = items2.page_id LIMIT 25;
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...