query-c5117bb785e25eeecf435064d0ff2f59
Fictional futuresMake a table of works that depict the world 50+ years in the future from their publication date
Use at
- https://query.wikidata.org/sparql
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#>
select ?work ?workLabel
(min(year(?pubDate)) as ?earliestPublicationYear)
(max(year(?settingYear)) as ?latestSettingYear)
where {
?work wdt:P2408 ?period;
wdt:P577 ?pubDate.
?period wdt:P31 wd:Q3186692;
wdt:P585 ?settingYear.
filter(year(?settingYear) - year(?pubDate) >= 50)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
group by ?work ?workLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?earliestPublicationYear")
v6("?latestSettingYear")
v4("?period")
v2("?pubDate"):::projected
v1("?settingYear"):::projected
v3("?work"):::projected
c8(["bd:serviceParam"]):::iri
c5(["wd:Q3186692"]):::iri
c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["year-from-dateTime(?settingYear) - year-from-dateTime(?pubDate) >= '50^^xsd:integer'"]]
f0 --> v1
f0 --> v2
v3 --"wdt:P2408"--> v4
v3 --"wdt:P577"--> v2
v4 --"wdt:P31"--> c5
v4 --"wdt:P585"--> v1
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end
bind3[/"min(year-from-dateTime(?pubDate))"/]
v2 --o bind3
bind3 --as--o v5
bind4[/"max(year-from-dateTime(?settingYear))"/]
v1 --o bind4
bind4 --as--o v6