query-10aac6f88acf1fee9479840a5f7f928b

rq turtle/ttl

List all items that are a subclass of mineral and are missing a label in German SELECT ?item ?itemLabel WHERE { ?item wdt:P279* wd:Q7946 . filter not exists { ?item rdfs:label ?missinglabel filter (lang(?missinglabel) = "de") } . SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . } }

Use at

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#>
# List all items that are a subclass of mineral and are missing a label in German
SELECT ?item ?itemLabel WHERE {
    ?item wdt:P279* wd:Q7946 .
    filter not exists { ?item rdfs:label ?missinglabel filter (lang(?missinglabel) = "de") } .
    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; v2("?item"):::projected v1("?missinglabel") c6(["bd:serviceParam"]):::iri c8(["en"]):::literal c4(["wd:Q7946"]):::iri f0[["not "]] subgraph f0e0["Exists Clause"] e0f0[["?missinglabel = 'de'"]] e0f0 --> e0v1 e0v2 --"rdfs:label"--> e0v1 e0v2("?item"):::projected e0v1("?missinglabel"):::projected end f0--EXISTS--> f0e0 f0 --> v1 f0 --> v2 f0 --> c2 f1[["?missinglabel = 'de'"]] f1 --> v1 v2 --"rdfs:label"--> v1 v2 --"wdt:P279"--> c4 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c6 --"wikibase:language"--> c8 end