query-4cacbe971bf91698db59e1c2a34b0ec9
Query for non-existent labelsHi experts! Is it possible to query for items that don't have a label in a certain language? For example, I'm looking for first names without label in English. I tried it by using (with the standard prefixes):
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 ?name ?name_label WHERE {
?name wdt:P31/wdt:P279* wd:Q202444 .
optional {
?name rdfs:label ?name_label filter (!lang(?name_label) = "en")
}
} LIMIT 10
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?name"):::projected
v1("?name_label"):::projected
a1((" "))
c4(["wd:Q202444"]):::iri
v2 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."rdfs:label".-> v1
end