query-e61bc6059fc89228f62eb8d117b07de9

rq turtle/ttl

Paintings made on places that are not a work location of Van Gogh SELECT ?item ?inception ?location ?image WHERE { ?item wdt:P31 wd:Q3305213 . ?item wdt:P170 wd:Q5582 . ?item wdt:P571 ?inception . OPTIONAL { ?item wdt:P18 ?image } ?item wdt:P1071 ?location . MINUS { wd:Q5582 wdt:P937 ?location } . MINUS { wd:Q5582 wdt:P937 ?superlocation . ?location wdt:P131 ?superlocation} . }

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
#Paintings made on places that are not a work location of Van Gogh
SELECT ?item ?inception ?location ?image WHERE { 
  ?item wdt:P31 wd:Q3305213 . 
  ?item wdt:P170 wd:Q5582 . 
  ?item wdt:P571 ?inception . 
  OPTIONAL { ?item wdt:P18 ?image } 
  ?item wdt:P1071 ?location . 
  MINUS { wd:Q5582 wdt:P937 ?location } . 
  MINUS { wd:Q5582 wdt:P937 ?superlocation .
        ?location wdt:P131 ?superlocation} .
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?image"):::projected v2("?inception"):::projected v1("?item"):::projected v4("?location"):::projected v5("?superlocation") c2(["wd:Q3305213"]):::iri c4(["wd:Q5582"]):::iri v1 --"wdt:P31"--> c2 v1 --"wdt:P170"--> c4 v1 --"wdt:P571"--> v2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P18".-> v3 end v1 --"wdt:P1071"--> v4 subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; c4 --"wdt:P937"--> v4 end subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; c4 --"wdt:P937"--> v5 v4 --"wdt:P131"--> v5 end