query-80bebc131ba3e5cdc77a2408ab620a64
Same date of birth and death :Tsoarin @09:17, 1 May 2019 (UTC)) talk (TsaorinHow to obtain people who has death the same day of the month as they have born? It is the case os the poet Kavafis (Q216980) --
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
select ?person ?personLabel
where {
{
select ?person {
?person wdt:P31 wd:Q5
; p:P569/psv:P569 ?birth
; p:P570/psv:P570 ?death
.
?birth wikibase:timePrecision ?bprec
; wikibase:timeValue ?bval
filter (?bprec >= 11)
.
?death wikibase:timePrecision ?dprec
; wikibase:timeValue ?dval
filter (?dprec >= 11)
.
filter (day(?bval) = day(?dval) && month(?bval) = month(?dval)) .
} limit 4000
}.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?birth")
v4("?bprec")
v1("?bval")
v7("?death")
v3("?dprec")
v2("?dval")
v5("?person"):::projected
a1((" "))
a2((" "))
c11(["bd:serviceParam"]):::iri
c3(["wd:Q5"]):::iri
c13(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["day-from-dateTime(?bval) = day-from-dateTime(?dval)month-from-dateTime(?bval) = month-from-dateTime(?dval)"]]
f0 --> v1
f0 --> v2
f1[["?dprec >= '11^^xsd:integer'"]]
f1 --> v3
f2[["?bprec >= '11^^xsd:integer'"]]
f2 --> v4
v5 --"p:direct/P31"--> c3
v5 --"p:P569"--> a1
a1 --"p:statement/value/P569"--> v6
v5 --"p:P570"--> a2
a2 --"p:statement/value/P570"--> v7
v6 --"wikibase:timePrecision"--> v4
v6 --"wikibase:timeValue"--> v1
v7 --"wikibase:timePrecision"--> v3
v7 --"wikibase:timeValue"--> v2
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
end