query-06752c107337b60d9dc680f92ad2cc78
TODO
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 ?item ?itemLabel ?a ?b WHERE {
{
SELECT ?item ?a ?b {
?item wdt:P27 wd:Q142 . #limit to just people from France to avoid timeout
?item wdt:P31 wd:Q5;
p:P570 [ a wikibase:BestRank; psv:P570 [ wikibase:timeValue ?a; wikibase:timePrecision ?tpa ]];
p:P570 [ a wikibase:BestRank; psv:P570 [ wikibase:timeValue ?b; wikibase:timePrecision ?tpb ]].
FILTER(?a < ?b)
FILTER(?tpa>=11) #limit to just dates with at least day-precision
FILTER(?tpb>=11)
}
} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?a) ?itemLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?a"):::projected
v5("?b"):::projected
v6("?item"):::projected
v2("?itemLabel"):::projected
v4("?tpa")
v3("?tpb")
a1((" "))
a2((" "))
a3((" "))
a4((" "))
c7(["wikibase:BestRank"]):::iri
c13(["bd:serviceParam"]):::iri
c5(["wd:Q5"]):::iri
c15(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c3(["wd:Q142"]):::iri
f0[["?tpb >= '11^^xsd:integer'"]]
f0 --> v3
f1[["?tpa >= '11^^xsd:integer'"]]
f1 --> v4
f2[["?a < ?b"]]
f2 --> v1
f2 --> v5
v6 --"p:direct/P27"--> c3
v6 --"p:direct/P31"--> c5
a1 --"a"--> c7
a2 --"wikibase:timeValue"--> v1
a2 --"wikibase:timePrecision"--> v4
a1 --"p:statement/value/P570"--> a2
v6 --"p:P570"--> a1
a3 --"a"--> c7
a4 --"wikibase:timeValue"--> v5
a4 --"wikibase:timePrecision"--> v3
a3 --"p:statement/value/P570"--> a4
v6 --"p:P570"--> a3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c13 --"wikibase:language"--> c15
end