query-c54c3c9d8b8307c6bfe2bf162fb6945b
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT DISTINCT ?item ?deathDate ?pubDate ?diff_in_years WHERE {
{
SELECT DISTINCT ?item ?deathDate WHERE {
?item wdt:P50/wdt:P570 ?deathDate .
FILTER(YEAR(?deathDate) <= 1947) .
}
}.
VALUES ?class { wd:Q4119870 wd:Q13442814 }
?item wdt:P31/wdt:P279* ?class; wdt:P1433?/wdt:P577 ?pubDate .
BIND((?deathDate - ?pubDate)/365.2425 AS ?diff_in_years) .
} ORDER BY DESC(?diff_in_years) LIMIT 100
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?class")
v2("?deathDate"):::projected
v6("?diff_in_years"):::projected
v3("?item"):::projected
v5("?pubDate"):::projected
a1((" "))
a2((" "))
a3((" "))
f0[["year-from-dateTime(?deathDate) <= '1947^^xsd:integer'"]]
f0 --> v2
v3 --"wdt:P50"--> a1
a1 --"wdt:P570"--> v2
bind1[/VALUES ?class/]
bind1-->v4
bind10(["wd:Q4119870"])
bind10 --> bind1
bind11(["wd:Q13442814"])
bind11 --> bind1
v3 --"wdt:P31"--> a2
a2 --"wdt:P279"--> v4
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v3 --"wdt:P1433"--> a3
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
end
union0r <== or ==> union0l
end
a3 --"wdt:P577"--> v5
bind2[/"?deathDate - ?pubDate / '365.2425^^xsd:decimal'"/]
v2 --o bind2
v5 --o bind2
bind2 --as--o v6