query-68eb07839dff9203bdbeb59831a9f4b4
Properties and values from single item
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?prop_id ?prop_label ?prop_val_label WHERE {
VALUES (?company) {
(wd:Q208048)
}
?company ?prop_id ?company_item.
?wd wikibase:directClaim ?prop_id.
?wd rdfs:label ?prop_label.
OPTIONAL {
?company_item rdfs:label ?prop_val.
FILTER((LANG(?prop_val)) = "en")
}
BIND(COALESCE(?prop_val, ?companyItem) AS ?prop_val_label)
FILTER((LANG(?prop_label)) = "en")
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?company")
v5("?company_item")
v4("?prop_id"):::projected
v1("?prop_label"):::projected
v2("?prop_val")
v7("?prop_val_label"):::projected
v6("?wd")
f0[["?prop_label = 'en'"]]
f0 --> v1
bind1[/VALUES ?company/]
bind1-->v3
bind10(["wd:Q208048"])
bind10 --> bind1
v3 -->v4--> v5
v6 --"wikibase:directClaim"--> v4
v6 --"rdfs:label"--> v1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v5 -."rdfs:label".-> v2
end
bind2[/"?prop_val?companyItem"/]
v2 --o bind2
null --o bind2
bind2 --as--o v7