query-e1cb7db2e6eac91966d2abb0f894d121

rq turtle/ttl

TODO

Use at

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 DISTINCT ?itemLabel ?age ?item WHERE {?item wdt:P31/wdt:P279* wd:Q144 ;
                                                   wdt:P569 ?naissance ;
                                                   wdt:P570 ?mort .
        FILTER(?age > 19) .
        BIND(round((?mort - ?naissance)*100/365.2425) as ?a)
        BIND(?a/100 as ?age)
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }
    ORDER BY DESC (?age)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?a") v6("?age"):::projected v2("?item"):::projected v4("?mort") v3("?naissance") a1((" ")) c8(["bd:serviceParam"]):::iri c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal c4(["wd:Q144"]):::iri f0[["?age > '19^^xsd:integer'"]] f0 --> v6 v2 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c4 v2 --"wdt:P569"--> v3 v2 --"wdt:P570"--> v4 bind1[/"numeric-round(?mort - ?naissance * '100^^xsd:integer' / '365.2425^^xsd:decimal')"/] v4 --o bind1 v3 --o bind1 bind1 --as--o v5 bind2[/"?a / '100^^xsd:integer'"/] v5 --o bind2 bind2 --as--o v6 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end