query-70acb477adc65b7653e022b5689cc376
Personnes décédées en 2018 classées par nombre de liens de sites select ?person ?personLabel ?died ?age ?sitelinks where { ?person wdt:P31 wd:Q5; wdt:P569 ?born; wdt:P570 ?died.
BIND(?died - ?born AS ?ageInDays). BIND(?ageInDays/365.2425 AS ?ageInYears). BIND(FLOOR(?ageInYears) AS ?age).
filter (?died >= "2020-02-07T00:00:00Z"^^xsd:dateTime && ?died < "2020-03-07T00:00:00Z"^^xsd:dateTime) ?person wikibase:sitelinks ?sitelinks. service wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } order by desc(?sitelinks)
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#>
#Personnes décédées en 2018 classées par nombre de liens de sites
select ?person ?personLabel ?died ?age ?sitelinks where {
?person wdt:P31 wd:Q5;
wdt:P569 ?born;
wdt:P570 ?died.
BIND(?died - ?born AS ?ageInDays).
BIND(?ageInDays/365.2425 AS ?ageInYears).
BIND(FLOOR(?ageInYears) AS ?age).
filter (?died >= "2020-02-07T00:00:00Z"^^xsd:dateTime && ?died < "2020-03-07T00:00:00Z"^^xsd:dateTime)
?person wikibase:sitelinks ?sitelinks.
service wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} order by desc(?sitelinks)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v7("?age"):::projected
v5("?ageInDays")
v6("?ageInYears")
v4("?born")
v2("?died"):::projected
v3("?person"):::projected
v1("?sitelinks"):::projected
c9(["bd:serviceParam"]):::iri
c4(["wd:Q5"]):::iri
c11(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["?died >= '2020-02-07T00:00:00Z^^xsd:dateTime'?died < '2020-03-07T00:00:00Z^^xsd:dateTime'"]]
f0 --> v2
v3 --"wdt:P31"--> c4
v3 --"wdt:P569"--> v4
v3 --"wdt:P570"--> v2
bind1[/"?died - ?born"/]
v2 --o bind1
v4 --o bind1
bind1 --as--o v5
bind2[/"?ageInDays / '365.2425^^xsd:decimal'"/]
v5 --o bind2
bind2 --as--o v6
bind3[/"numeric-floor(?ageInYears)"/]
v6 --o bind3
bind3 --as--o v7
v3 --"wikibase:sitelinks"--> v1
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
end