query-07f897e07fb516df31ea066bfe37902d
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT * WHERE {
?q wdt:P106 wd:Q36180 ; wdt:P31 wd:Q5 . #writer
OPTIONAL { ?q wdt:P570 ?dod . FILTER ( year(?dod) < 1948 ) } #death before 1948
OPTIONAL { ?q wdt:P569 ?dob . FILTER (year(?dob) < 1840) } #birth before 1840
OPTIONAL { ?q wdt:P1559 ?name}
OPTIONAL { ?q wdt:P18 ?photo}
{ ?q wdt:P103/wdt:P279* wd:Q7850 } UNION { ?q wdt:P1412/wdt:P279* wd:Q7850 }
}
ORDER BY DESC(?dod)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?dob"):::projected
v1("?dod"):::projected
v4("?name"):::projected
v5("?photo"):::projected
v3("?q"):::projected
a1((" "))
a2((" "))
c4(["wd:Q36180"]):::iri
c13(["wd:Q7850"]):::iri
c6(["wd:Q5"]):::iri
v3 --"wdt:P106"--> c4
v3 --"wdt:P31"--> c6
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P570".-> v1
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P569".-> v2
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P1559".-> v4
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P18".-> v5
end
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v3 --"wdt:P1412"--> a2
a2 --"wdt:P279"--> c13
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v3 --"wdt:P103"--> a1
a1 --"wdt:P279"--> c13
end
union0r <== or ==> union0l
end