query-a7e8951950475b19fc34773977f36e3f
find items with a category with an English label, but no English label on item
SELECT ?item ?categorylabel
{
?item wdt:P31 wd:Q29791211 .
FILTER NOT EXISTS { ?item rdfs:label ?l . FILTER (lang(?l) = "en") }
?item wdt:P910 / rdfs:label ?categorylabel . FILTER(lang(?categorylabel)="en" )
}
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#>
#find items with a category with an English label, but no English label on item
SELECT ?item ?categorylabel
{
?item wdt:P31 wd:Q29791211 .
FILTER NOT EXISTS { ?item rdfs:label ?l . FILTER (lang(?l) = "en") }
?item wdt:P910 / rdfs:label ?categorylabel . FILTER(lang(?categorylabel)="en" )
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?categorylabel"):::projected
v3("?item"):::projected
v2("?l")
a1((" "))
c4(["wd:Q29791211"]):::iri
f0[["?categorylabel = 'en'"]]
f0 --> v1
f1[["not "]]
subgraph f1e0["Exists Clause"]
e0f0[["?l = 'en'"]]
e0f0 --> e0v1
e0v2 --"rdfs:label"--> e0v1
e0v2("?item"):::projected
e0v1("?l"):::projected
end
f1--EXISTS--> f1e0
f1 --> v2
f1 --> v3
f1 --> c2
f2[["?l = 'en'"]]
f2 --> v2
v3 --"rdfs:label"--> v2
v3 --"wdt:P31"--> c4
v3 --"wdt:P910"--> a1
a1 --"rdfs:label"--> v1