alaa_wmde added a comment.

  Lookup entity ids by label or alias
  -----------------------------------
  
  **[OLD]**
  
    ## Get property ids of properties with a label or alias starting with 
'hell' across languages
    
    SELECT DISTINCT term_full_entity_id
    FROM wb_terms
    WHERE
        term_entity_type     = 'property'
        AND term_type       IN ( 'label', 'alias' )
        AND term_text     LIKE 'hell%'
    ;
  
  **[NEW]**
  
    ## Get property ids of properties with a label or alias starting with 
'hell' across languages
    
    SELECT DISTINCT ( CONCAT( 'P', wbpt_property_id ) ) as term_full_entity_id
    FROM wbt_property_terms
        INNER JOIN wbt_term_in_lang ON wbpt_term_in_lang_id = wbtl_id
        INNER JOIN wbt_type         ON wbtl_type_id = wby_id
        INNER JOIN wbt_text_in_lang ON wbtl_text_in_lang_id = wbxl_id
        INNER JOIN wbt_text         ON wbxl_text_id = wbx_id
    WHERE
        wby_name       IN ( 'label', 'alias' )
        AND wbx_text LIKE 'hell%'
    ;

TASK DETAIL
  https://phabricator.wikimedia.org/T221747

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: alaa_wmde
Cc: Aklapper, Lea_Lacroix_WMDE, alaa_wmde, Nandana, Lahi, Gq86, 
GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Wikidata-bugs, 
aude, Lydia_Pintscher, JeroenDeDauw, Mbch331
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to