query-cdb424eb826e0bd325b04795a22b14b0
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT ?item (YEAR(?value1) AS ?year) ?rank1 ?value2 ?prec ?rank2 {
?item p:P569 ?statement1, ?statement2 .
FILTER( ?statement1 != ?statement2 ) .
?statement1 wikibase:rank ?rank1; psv:P569 [ wikibase:timeValue ?value1; wikibase:timePrecision 9 ] .
?statement2 wikibase:rank ?rank2; psv:P569 [ wikibase:timeValue ?value2; wikibase:timePrecision ?prec ] .
FILTER( ?prec > 9 ) .
FILTER( YEAR( ?value1 ) = YEAR( ?value2 ) ) .
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?item"):::projected
v3("?prec"):::projected
v7("?rank1"):::projected
v8("?rank2"):::projected
v4("?statement1")
v5("?statement2")
v1("?value1"):::projected
v2("?value2"):::projected
v9("?year")
a1((" "))
a2((" "))
c1(["9^^xsd:integer"]):::literal
f0[["year-from-dateTime(?value1) = year-from-dateTime(?value2)"]]
f0 --> v1
f0 --> v2
f1[["?prec > '9^^xsd:integer'"]]
f1 --> v3
f2[["?statement1 != ?statement2"]]
f2 --> v4
f2 --> v5
v6 --"p:P569"--> v4
v6 --"p:P569"--> v5
v4 --"wikibase:rank"--> v7
a1 --"wikibase:timeValue"--> v1
a1 --"wikibase:timePrecision"--> c1
v4 --"p:statement/value/P569"--> a1
v5 --"wikibase:rank"--> v8
a2 --"wikibase:timeValue"--> v2
a2 --"wikibase:timePrecision"--> v3
v5 --"p:statement/value/P569"--> a2
bind3[/"year-from-dateTime(?value1)"/]
v1 --o bind3
bind3 --as--o v9