query-e562c767d308e41ba4a841cbf00f9a9a
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?prest ?prestLabel ?f_dselsdato ?age ?d_dsdato WHERE {
?prest wdt:P106 wd:Q42603.
?prest wdt:P27 wd:Q20.
OPTIONAL { ?prest wdt:P569 ?f_dselsdato. }
OPTIONAL { ?prest wdt:P570 ?d_dsdato. }
filter(year(?f_dselsdato) > 1700 )
filter(year(?d_dsdato) < 1900 )
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?d_dsdato"):::projected
v2("?f_dselsdato"):::projected
v3("?prest"):::projected
c4(["wd:Q42603"]):::iri
c6(["wd:Q20"]):::iri
f0[["year-from-dateTime(?d_dsdato) < '1900^^xsd:integer'"]]
f0 --> v1
f1[["year-from-dateTime(?f_dselsdato) > '1700^^xsd:integer'"]]
f1 --> v2
v3 --"wdt:P106"--> c4
v3 --"wdt:P27"--> c6
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P569".-> v2
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P570".-> v1
end