query-d1aed7a77334734bbf332304b44dd251
Items that have country = Armenia, have an Armenian label and are missing an English label SELECT ?item ?itemLabel ?armenianLabel WHERE { ?item wdt:P17 wd:Q399 . ?item rdfs:label ?armenianLabel filter (lang(?armenianLabel) = "hy") . filter not exists { ?item rdfs:label ?missinglabel filter (lang(?missinglabel) = "en") } . SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . } }
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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Items that have country = Armenia, have an Armenian label and are missing an English label
SELECT ?item ?itemLabel ?armenianLabel WHERE {
?item wdt:P17 wd:Q399 .
?item rdfs:label ?armenianLabel filter (lang(?armenianLabel) = "hy") .
filter not exists { ?item rdfs:label ?missinglabel filter (lang(?missinglabel) = "en") } .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .
}
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?armenianLabel"):::projected
v2("?item"):::projected
v1("?missinglabel")
c5(["wd:Q399"]):::iri
c7(["bd:serviceParam"]):::iri
c1(["en"]):::literal
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0f0[["?missinglabel = 'en'"]]
e0f0 --> e0v1
e0v2 --"rdfs:label"--> e0v1
e0v2("?item"):::projected
e0v1("?missinglabel"):::projected
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> v2
f0 --> c2
f1[["?missinglabel = 'en'"]]
f1 --> v1
v2 --"rdfs:label"--> v1
f2[["?armenianLabel = 'hy'"]]
f2 --> v3
v2 --"wdt:P17"--> c5
v2 --"rdfs:label"--> v3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c1
end