I'm using the below query which works fine to check for all possible combinations of the domains which works well but the Ticker symbol is not being returned. I'm sure I'm querying the property in an incorrect way but not sure how to get an indirect property. Kindly help.
SELECT distinct
?official_name
(GROUP_CONCAT( DISTINCT ?isin; separator=";") AS ?isin)
?item
?itemLabel
?stock_exchange
?stock_exchangeLabel
(GROUP_CONCAT( DISTINCT ?other_name; separator=";") AS ?other_name)
WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
?item (wdt:P31/wdt:P279*) wd:Q783794.
{
{ ?item wdt:P856 <https://www.google.com> }
UNION { ?item wdt:P856 <http://www.google.com> }
UNION { ?item wdt:P856 <https://www.google.com/> }
UNION { ?item wdt:P856 <http://www.google.com/> }
UNION { ?item wdt:P856 <https://google.com> }
UNION { ?item wdt:P856 <http://google.com> }
UNION { ?item wdt:P856 <https://google.com/> }
UNION { ?item wdt:P856 <http://google.com/> }
}
OPTIONAL { ?item wdt:P1448 ?official_name. }
OPTIONAL { ?item wdt:P946 ?isin. }
OPTIONAL { ?item wdt:P414 ?stock_exchange. }
OPTIONAL { ?item skos:altLabel ?other_name. FILTER (LANG (?other_name) = "en") }
}
GROUP BY ?official_name ?item ?stock_exchange ?itemLabel ?stock_exchangeLabel