This query is marked as a draft This query has been published by Magnus Manske.

SQL

x
 
use wikidatawiki_p;
SELECT
    (SELECT page_title FROM page,pagelinks WHERE page_title=concat('P',wbpt_property_id) AND page_namespace=120 AND pl_from=page_id AND pl_namespace=120 AND pl_title='P1630') AS page_title,
    wbx_text as term_text
FROM wbt_property_terms,wbt_term_in_lang,wbt_text_in_lang,wbt_text
WHERE
    wbpt_term_in_lang_id = wbtl_id 
    AND wbtl_type_id=1 /* label */
    AND wbtl_text_in_lang_id = wbxl_id 
    AND wbxl_language='en'
    AND wbxl_text_id = wbx_id
HAVING page_title IS NOT NULL
By running queries you agree to the Cloud Services Terms of Use and you irrevocably agree to release your SQL under CC0 License.
All SQL code is licensed under CC0 License.

Checking query status...