query-c0fbe80aed8884a243d5660535a333e9
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT distinct
?official_name
(GROUP_CONCAT( DISTINCT ?isin; separator=";") AS ?isin)
?item
?itemLabel
?stock_exchange
?stock_exchangeLabel
(GROUP_CONCAT( DISTINCT ?Ticker; separator=";") AS ?Ticker)
(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> }
}
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") }
?SE pq:P249 ?Ticker
}
GROUP BY ?official_name ?item ?stock_exchange ?itemLabel ?stock_exchangeLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?SE")
v8("?Ticker"):::projected
v8("?isin"):::projected
v2("?item"):::projected
v3("?official_name"):::projected
v8("?other_name"):::projected
v5("?stock_exchange"):::projected
a1((" "))
c10([https://www.google.com]):::iri
c8(["wd:Q783794"]):::iri
c11([http://www.google.com]):::iri
c3(["bd:serviceParam"]):::iri
c5(["#91;AUTO_LANGUAGE#93;,en"]):::literal
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c3 --"wikibase:language"--> c5
end
v2 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c8
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P856"--> c11
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P856"--> c10
end
union0r <== or ==> union0l
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P1448".-> v3
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P946".-> v8
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P414".-> v5
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v2 -."skos:altLabel".-> v8
end
v6 --"pq:P249"--> v8
bind3[/"?isin"/]
v8 --o bind3
bind3 --as--o v8
bind4[/"?Ticker"/]
v8 --o bind4
bind4 --as--o v8
bind5[/"?other_name"/]
v8 --o bind5
bind5 --as--o v8