query-40b492caefb9f88148d49e5ec89a3942

rq turtle/ttl

Propertiesinstance of (P31)subclass of (P279)image (P18)

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?item ?image
WHERE
{
  ?item wdt:P31/wdt:P279*/wdt:P31* wd:Q17444909.
  MINUS { ?item wdt:P18 ?image } # or OPTIONAL { ?link wdt:P18 ?image }
}
# or ORDER BY ASC(?image)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?image"):::projected v1("?item"):::projected a1((" ")) a2((" ")) c3(["wd:Q17444909"]):::iri v1 --"wdt:P31"--> a1 a1 --"wdt:P279"--> a2 a2 --"wdt:P31"--> c3 subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P18"--> v2 end