query-a4aade7e7a80e56b77c76caa9447d67d
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?item (SAMPLE(coalesce(?en_label, ?item_label)) as ?label) WHERE {
?item wdt:P31 wd:Q22674925 .
optional {?item rdfs:label ?en_label . filter(LANG(?en_label) = "en")}
optional {?item rdfs:label ?item_label}
} group by ?item
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?en_label"):::projected
v2("?item"):::projected
v3("?item_label"):::projected
v4("?label")
c3(["wd:Q22674925"]):::iri
v2 --"wdt:P31"--> c3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."rdfs:label".-> v1
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."rdfs:label".-> v3
end
bind1[/"sample(?en_label?item_label)"/]
v1 --o bind1
v3 --o bind1
bind1 --as--o v4