query-1739ef42821be22b6b91b311f930cf59
publications published before 1800
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(?dop) as ?year) WHERE {
# look for items of type "work" or "data" (or children)
?item wdt:P31/wdt:P279* ?pq .
VALUES ?pq { wd:Q386724 wd:Q42848 }
# get date of publication and make sure is old enough that all the creators are dead for more than 100 years.
?item wdt:P577 ?dop .
FILTER (?dop < "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("?dop"):::projected
v1("?item"):::projected
v4("?pq")
v4("?year")
a1((" "))
a2((" "))
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[["?dop < '1800-01-01T00:00:01^^xsd:dateTime'"]]
f1 --> v2
v1 --"wdt:P31"--> a2
a2 --"wdt:P279"--> v4
bind2[/VALUES ?pq/]
bind2-->v4
bind20(["wd:Q386724"])
bind20 --> bind2
bind21(["wd:Q42848"])
bind21 --> bind2
v1 --"wdt:P577"--> v2
bind3[/"year-from-dateTime(?dop)"/]
v2 --o bind3
bind3 --as--o v4