query-8447339409b5e1e725bc8fc9099433de
Query a company based on its official website.> it does not return any result. https://www.amazon.co.uk/>, it returns a result but when I search for <https://www.amazon.comAmazon has multiple official websites listed. If I search for <
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
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.amazon.co.uk/> }
}
OPTIONAL { ?item wdt:P1448 ?official_name. }
OPTIONAL { ?item wdt:P946 ?isin. }
OPTIONAL {
?item p:P414 ?SE .
?SE ps:P414 ?stock_exchange .
?SE pq:P249 ?ticker .
}
OPTIONAL { ?item skos:altLabel ?other_name. FILTER (LANG (?other_name) = "en") }
}
GROUP BY ?official_name ?item ?itemLabel ?stock_exchange ?stock_exchangeLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?SE")
v8("?isin"):::projected
v2("?item"):::projected
v3("?official_name"):::projected
v8("?other_name"):::projected
v6("?stock_exchange"):::projected
v8("?ticker"):::projected
a1((" "))
c10([https://www.amazon.co.uk/]):::iri
c8(["wd:Q783794"]):::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 --"p:direct/P31"--> a1
a1 --"p:direct/P279"--> c8
v2 --"p:direct/P856"--> c10
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P1448".-> v3
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P946".-> v8
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:P414".-> v5
v5 --"p:statement/P414"--> v6
v5 --"p:qualifier/P249"--> v8
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v2 -."skos:altLabel".-> v8
end
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