query-6ebd877ef5105aed9da3327924789ac6
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 [ wikibase:rank ?ra; psv:P570 [ wikibase:timeValue ?a; wikibase:timePrecision ?tpa ]];
p:P570 [ wikibase:rank ?rb; psv:P570 [ wikibase:timeValue ?b; wikibase:timePrecision ?tpb ]].
FILTER(?a < ?b)
FILTER(?ra != wikibase:DeprecatedRank && ?rb != wikibase:DeprecatedRank && ?ra = ?rb)
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
v7("?b"):::projected
v8("?item"):::projected
v2("?itemLabel"):::projected
v5("?ra")
v6("?rb")
v4("?tpa")
v3("?tpb")
a1((" "))
a2((" "))
a3((" "))
a4((" "))
c13(["bd:serviceParam"]):::iri
c6(["wd:Q5"]):::iri
c15(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c4(["wd:Q142"]):::iri
f0[["?tpb >= '11^^xsd:integer'"]]
f0 --> v3
f1[["?tpa >= '11^^xsd:integer'"]]
f1 --> v4
f2[["?ra != 'wikibase:DeprecatedRank'?rb != 'wikibase:DeprecatedRank'?ra = ?rb"]]
f2 --> v5
f2 --> v6
f3[["?a < ?b"]]
f3 --> v1
f3 --> v7
v8 --"p:direct/P27"--> c4
v8 --"p:direct/P31"--> c6
a1 --"wikibase:rank"--> v5
a2 --"wikibase:timeValue"--> v1
a2 --"wikibase:timePrecision"--> v4
a1 --"p:statement/value/P570"--> a2
v8 --"p:P570"--> a1
a3 --"wikibase:rank"--> v6
a4 --"wikibase:timeValue"--> v7
a4 --"wikibase:timePrecision"--> v3
a3 --"p:statement/value/P570"--> a4
v8 --"p:P570"--> a3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c13 --"wikibase:language"--> c15
end