query-3ca78977cba3c58e928a12ce4eaa9fca
Êtres humains qui ont 6 mois entre leur mois de naissance et leur mois de mort. SELECT DISTINCT ?itemLabel ?item WHERE { {select distinct ?item where{ ?item wdt:P31 wd:Q5 ; p:P569/psv:P569 [wikibase:timePrecision ?datePrecision1; wikibase:timeValue ?naissance] ; p:P570/psv:P570 [wikibase:timePrecision ?datePrecision2; wikibase:timeValue ?mort ]. filter(?datePrecision1>10) filter(?datePrecision2>10) bind(month(?mort) - month(?naissance) as ?mois) bind(day(?mort) - day(?naissance) as ?jour) FILTER(abs(?mois) = 6) FILTER(?jour = 0) }limit 100 } SERVICE wikibase:label {bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".} } order by ?itemLabel
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#>
#Êtres humains qui ont 6 mois entre leur mois de naissance et leur mois de mort.
SELECT DISTINCT ?itemLabel ?item WHERE {
{select distinct ?item where{
?item wdt:P31 wd:Q5 ;
p:P569/psv:P569 [wikibase:timePrecision ?datePrecision1; wikibase:timeValue ?naissance] ;
p:P570/psv:P570 [wikibase:timePrecision ?datePrecision2; wikibase:timeValue ?mort ].
filter(?datePrecision1>10)
filter(?datePrecision2>10)
bind(month(?mort) - month(?naissance) as ?mois)
bind(day(?mort) - day(?naissance) as ?jour)
FILTER(abs(?mois) = 6)
FILTER(?jour = 0)
}limit 100 }
SERVICE wikibase:label {bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".}
}
order by ?itemLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?datePrecision1")
v4("?datePrecision2")
v6("?item"):::projected
v1("?itemLabel"):::projected
v9("?jour")
v9("?mois")
v8("?mort")
v7("?naissance")
a2((" "))
a1((" "))
a4((" "))
a3((" "))
c13(["bd:serviceParam"]):::iri
c5(["wd:Q5"]):::iri
c15(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["?jour = '0^^xsd:integer'"]]
f0 --> v9
f1[["numeric-abs(?mois) = '6^^xsd:integer'"]]
f1 --> v9
f2[["?datePrecision2 > '10^^xsd:integer'"]]
f2 --> v4
f3[["?datePrecision1 > '10^^xsd:integer'"]]
f3 --> v5
v6 --"p:direct/P31"--> c5
a1 --"wikibase:timePrecision"--> v5
a1 --"wikibase:timeValue"--> v7
v6 --"p:P569"--> a2
a2 --"p:statement/value/P569"--> a1
a3 --"wikibase:timePrecision"--> v4
a3 --"wikibase:timeValue"--> v8
v6 --"p:P570"--> a4
a4 --"p:statement/value/P570"--> a3
bind4[/"month-from-dateTime(?mort) - month-from-dateTime(?naissance)"/]
v8 --o bind4
v7 --o bind4
bind4 --as--o v9
bind5[/"day-from-dateTime(?mort) - day-from-dateTime(?naissance)"/]
v8 --o bind5
v7 --o bind5
bind5 --as--o v9
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c13 --"wikibase:language"--> c15
end