query-1a1053d4e2d4d8e7b0a20fce9cbdbd8e
paintings created before 1800For works created before 1800, we can assume that that all the creators died more than 100 years ago.
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT DISTINCT ?item (YEAR(?date) as ?year) WHERE {
?item wdt:P31 wd:Q3305213 .
?item wdt:P571 ?date .
FILTER (?date < "1800-01-01T00:00:01"^^xsd:dateTime)
FILTER NOT EXISTS { ?item wdt:P6216 [] } # item does not have P6216 yet
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?date"):::projected
v1("?item"):::projected
v3("?year")
a1((" "))
c4(["wd:Q3305213"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"wdt:P6216"--> e0a1
e0v1("?item"):::projected
e0a1((" ")):::projected
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> c1
f0 --> a1
v1 --"wdt:P6216"--> a1
f1[["?date < '1800-01-01T00:00:01^^xsd:dateTime'"]]
f1 --> v2
v1 --"wdt:P31"--> c4
v1 --"wdt:P571"--> v2
bind2[/"year-from-dateTime(?date)"/]
v2 --o bind2
bind2 --as--o v3