query-e8cb8f73756bc89dba61850772733d21
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
{ ?q wdt:P103/wdt:P279* wd:Q7850 } UNION { ?q wdt:P1412/wdt:P279* wd:Q7850 }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?dob"):::projected
v2("?dod"):::projected
v3("?q"):::projected
a1((" "))
a2((" "))
c11(["wd:Q7850"]):::iri
c6(["wd:Q5"]):::iri
c4(["wd:Q36180"]):::iri
v3 --"wdt:P106"--> c4
v3 --"wdt:P31"--> c6
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P570".-> v2
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P569".-> v1
end
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v3 --"wdt:P1412"--> a2
a2 --"wdt:P279"--> c11
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v3 --"wdt:P103"--> a1
a1 --"wdt:P279"--> c11
end
union0r <== or ==> union0l
end