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 page_title, term_language, term_text FROM wb_property_info JOIN (SELECT * FROM page WHERE page_namespace = 120) AS props ON page_title = CONCAT("P",pi_property_id) JOIN (SELECT * FROM pagelinks WHERE pl_title = 'P1629') AS with_prop ON with_prop.pl_from = page_id JOIN (SELECT * FROM pagelinks WHERE pl_title = page_title AND pl_namespace = page_namespace AND pl_from_namespace = 0) AS items JOIN wb_entity_per_page ON epp_page_id = items.pl_from JOIN (SELECT * FROM wb_terms WHERE term_type = 'label' AND term_entity_type = 'item') AS item_labels ON item_labels.term_entity_id LEFT JOIN (SELECT * FROM wb_terms WHERE term_entity_type = 'property' AND term_type = 'label') AS prop_labels ON prop_labels.term_entity_id = pi_property_id AND prop_labels.term_language = item_labels.term_language ORDER BY pi_property_id;
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...