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_entity_id), CONCAT(labels1.term_text," (",GROUP_CONCAT(labels1.term_language),")"), CONCAT("Q",labels2.term_entity_id), CONCAT(labels2.term_text, " (",GROUP_CONCAT(labels2.term_language),")") FROM (SELECT * FROM pagelinks WHERE pl_title IN ("Q16521","Q310890") AND pl_from_namespace = 0) AS taxa1 JOIN wb_entity_per_page AS epp1 ON epp1.epp_page_id = taxa1.pl_from JOIN (SELECT * FROM wb_terms WHERE term_type IN ("label","alias") AND term_entity_type = "item") AS labels1 ON labels1.term_entity_id = epp_entity_id 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 wb_entity_per_page AS epp2 ON epp2.epp_entity_id = labels2.term_entity_id JOIN (SELECT * FROM pagelinks WHERE pl_title IN ("Q16521","Q310890") AND pl_from_namespace = 0) AS taxa2 ON taxa2.pl_from = epp2.epp_page_id GROUP BY epp1.epp_entity_id, epp2.epp_entity_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...