query-ce7c86ce9c0756ec788f4271c271dae4

rq turtle/ttl

List all items that are a subclass of mineral and are missing a picture statement SELECT ?item ?itemLabel WHERE { ?item wdt:P279* wd:Q7946 . filter not exists { ?item wdt:P18 ?x } . 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 bd: <http://www.bigdata.com/rdf#>
# List all items that are a subclass of mineral and are missing a picture statement
SELECT ?item ?itemLabel WHERE {
    ?item wdt:P279* wd:Q7946 .
    filter not exists { ?item wdt:P18 ?x } .
    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; v1("?item"):::projected v2("?x") c5(["bd:serviceParam"]):::iri c7(["en"]):::literal c3(["wd:Q7946"]):::iri f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"wdt:P18"--> e0v2 e0v1("?item"):::projected e0v2("?x"):::projected end f0--EXISTS--> f0e0 f0 --> v1 f0 --> c1 f0 --> v2 v1 --"wdt:P18"--> v2 v1 --"wdt:P279"--> c3 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c5 --"wikibase:language"--> c7 end