query-4f6c8607adcbf0584ef6cc0757fdd405
TODO
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 psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item1 ?item1Label ?age1 ?item2 ?item2Label
WHERE {
?date_node1 wikibase:timePrecision "9"^^xsd:integer .
?ddate_node1 wikibase:timePrecision "9"^^xsd:integer .
?item1 wdt:P31 wd:Q5 ; p:P569/psv:P569 ?date_node1 ; p:P570/psv:P570 ?ddate_node1 .
?date_node1 wikibase:timeValue ?date1 .
?ddate_node1 wikibase:timeValue ?ddate1 .
FILTER(?date1 > "+1000-01-01T00:00:00Z"^^xsd:dateTime) .
bind( year(?ddate1)-year(?date1) as ?age1 ) .
FILTER (?age1 > 90) .
?item1 wdt:P22 ?item2 .
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr" . }
}
ORDER BY DESC(?age1)
LIMIT 100
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v7("?age1"):::projected
v2("?date1")
v3("?date_node1")
v6("?ddate1")
v4("?ddate_node1")
v5("?item1"):::projected
v7("?item2"):::projected
a1((" "))
a2((" "))
c16(["fr"]):::literal
c14(["bd:serviceParam"]):::iri
c6(["wd:Q5"]):::iri
c4(["9^^xsd:integer"]):::literal
f0[["?age1 > '90^^xsd:integer'"]]
f0 --> v7
f1[["?date1 > '+1000-01-01T00:00:00Z^^xsd:dateTime'"]]
f1 --> v2
v3 --"wikibase:timePrecision"--> c4
v4 --"wikibase:timePrecision"--> c4
v5 --"p:direct/P31"--> c6
v5 --"p:P569"--> a1
a1 --"p:statement/value/P569"--> v3
v5 --"p:P570"--> a2
a2 --"p:statement/value/P570"--> v4
v3 --"wikibase:timeValue"--> v2
v4 --"wikibase:timeValue"--> v6
bind2[/"year-from-dateTime(?ddate1) - year-from-dateTime(?date1)"/]
v6 --o bind2
v2 --o bind2
bind2 --as--o v7
v5 --"p:direct/P22"--> v7
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c14 --"wikibase:language"--> c16
end