query-f02f66ea2990cd80b05bfd5f57143ec5
Physicist born on Oct 31
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
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 ?person ?personLabel ?birth ?death ?age WHERE {
?person wdt:P31 wd:Q5.
?person wdt:P106 wd:Q169470.
?person wdt:P569 ?birth.
OPTIONAL {?person wdt:P570 ?death.}
FILTER((DATATYPE(?birth)) = xsd:dateTime)
FILTER((MONTH(?birth)) = 10 )
FILTER((DAY(?birth)) = 31 )
BIND((YEAR(?death)) - (YEAR(?birth)) AS ?age)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?age"):::projected
v1("?birth"):::projected
v3("?death"):::projected
v2("?person"):::projected
c7(["wd:Q169470"]):::iri
c11(["bd:serviceParam"]):::iri
c13(["#91;AUTO_LANGUAGE#93;"]):::literal
c5(["wd:Q5"]):::iri
f0[["day-from-dateTime(?birth) = '31^^xsd:integer'"]]
f0 --> v1
f1[["month-from-dateTime(?birth) = '10^^xsd:integer'"]]
f1 --> v1
f2[["?birth = 'xsd:dateTime'"]]
f2 --> v1
v2 --"wdt:P31"--> c5
v2 --"wdt:P106"--> c7
v2 --"wdt:P569"--> v1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P570".-> v3
end
bind3[/"year-from-dateTime(?death) - year-from-dateTime(?birth)"/]
v3 --o bind3
v1 --o bind3
bind3 --as--o v4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
end