query-283b081ea6e07708372567ae6b674667
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
select distinct ?item ?s1 ?s2 where {
?item p:P569 ?s1, ?s2 filter(?s1 != ?s2) .
?s1 ps:P569 ?v1 ; wikibase:rank ?rank1 ; psv:P569/wikibase:timePrecision ?prec1 ; psv:P569/wikibase:timeCalendarModel ?cal1 filter ((?rank1 = wikibase:PreferredRank || ?rank1 = wikibase:NormalRank) && ?prec1 = "9"^^xsd:integer ).
?s2 ps:P569 ?v2 ; wikibase:rank ?rank2 ; psv:P569/wikibase:timePrecision ?prec2 ; psv:P569/wikibase:timeCalendarModel ?cal2 filter ( ?cal1 = ?cal2 && year(?v1) = year(?v2) && ?rank2 = wikibase:NormalRank && ?prec2 = "9"^^xsd:integer ) .
minus {
?s1 ?pq1 [] .
?qualifier1 wikibase:qualifier ?pq1.
}
minus {
?s2 ?pq2 [] .
?qualifier2 wikibase:qualifier ?pq2.
}
} limit 10
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?cal1")
v2("?cal2")
v11("?item"):::projected
v12("?pq1")
v14("?pq2")
v8("?prec1")
v6("?prec2")
v13("?qualifier1")
v15("?qualifier2")
v7("?rank1")
v5("?rank2")
v9("?s1"):::projected
v10("?s2"):::projected
v3("?v1")
v4("?v2")
a5((" "))
a6((" "))
a1((" "))
a2((" "))
a3((" "))
a4((" "))
f0[["?cal1 = ?cal2year-from-dateTime(?v1) = year-from-dateTime(?v2)?rank2 = 'wikibase:NormalRank'?prec2 = '9^^xsd:integer'"]]
f0 --> v1
f0 --> v2
f0 --> v3
f0 --> v4
f0 --> v5
f0 --> v6
f1[["(?rank1 = 'wikibase:PreferredRank' || ?rank1 = 'wikibase:NormalRank')?prec1 = '9^^xsd:integer'"]]
f1 --> v7
f1 --> v8
f2[["?s1 != ?s2"]]
f2 --> v9
f2 --> v10
v11 --"p:P569"--> v9
v11 --"p:P569"--> v10
v9 --"p:statement/P569"--> v3
v9 --"wikibase:rank"--> v7
v9 --"p:statement/value/P569"--> a1
a1 --"wikibase:timePrecision"--> v8
v9 --"p:statement/value/P569"--> a2
a2 --"wikibase:timeCalendarModel"--> v1
v10 --"p:statement/P569"--> v4
v10 --"wikibase:rank"--> v5
v10 --"p:statement/value/P569"--> a3
a3 --"wikibase:timePrecision"--> v6
v10 --"p:statement/value/P569"--> a4
a4 --"wikibase:timeCalendarModel"--> v2
subgraph minus3["MINUS"]
style minus3 stroke-width:6px,fill:pink,stroke:red;
v9 -->v12--> a5
v13 --"wikibase:qualifier"--> v12
end
subgraph minus4["MINUS"]
style minus4 stroke-width:6px,fill:pink,stroke:red;
v10 -->v14--> a6
v15 --"wikibase:qualifier"--> v14
end