query-761906df5e5210bb069bceacd4985903

rq turtle/ttl

TODO

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX pqv: <http://www.wikidata.org/prop/qualifier/value/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT ?item ?date1 ?point1 ?date2 ?point2 ?diff WHERE {
  ?item p:P1087 ?statement1, ?statement2 .
  FILTER( ?statement1 != ?statement2 ) .
  ?statement1 psv:P1087 ?pnode1; pqv:P585 ?node1 .
  ?statement2 psv:P1087 ?pnode2; pqv:P585 ?node2 .
  ?node1 wikibase:timePrecision 10 .
  ?node1 wikibase:timeValue ?date1 . 
  ?node2 wikibase:timePrecision 10 .
  ?node2 wikibase:timeValue ?date2 . 
  FILTER( ?date1 < ?date2 ) .
  BIND( ?date2 - ?date1 AS ?timedelta ) .
  FILTER( 28.0 <= ?timedelta && ?timedelta <= 31.0 ) .
  ?pnode1 wikibase:quantityAmount ?point1 . 
  ?pnode2 wikibase:quantityAmount ?point2 . 
  #FILTER( ?point1 != ?point2 ) .
  BIND( ABS( ?point2 - ?point1 ) AS ?diff ) .
}
ORDER BY DESC(?diff)
LIMIT 100

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?date1"):::projected v4("?date2"):::projected v14("?diff"):::projected v7("?item"):::projected v9("?node1") v11("?node2") v8("?pnode1") v10("?pnode2") v12("?point1"):::projected v13("?point2"):::projected v5("?statement1") v6("?statement2") v12("?timedelta") c7(["10^^xsd:integer"]):::literal f0[["'28.0^^xsd:decimal' <= ?timedelta?timedelta <= '31.0^^xsd:decimal'"]] f0 --> v12 f1[["?date1 < ?date2"]] f1 --> v3 f1 --> v4 f2[["?statement1 != ?statement2"]] f2 --> v5 f2 --> v6 v7 --"p:P1087"--> v5 v7 --"p:P1087"--> v6 v5 --"p:statement/value/P1087"--> v8 v5 --"p:qualifier/value/P585"--> v9 v6 --"p:statement/value/P1087"--> v10 v6 --"p:qualifier/value/P585"--> v11 v9 --"wikibase:timePrecision"--> c7 v9 --"wikibase:timeValue"--> v3 v11 --"wikibase:timePrecision"--> c7 v11 --"wikibase:timeValue"--> v4 bind3[/"?date2 - ?date1"/] v4 --o bind3 v3 --o bind3 bind3 --as--o v12 v8 --"wikibase:quantityAmount"--> v12 v10 --"wikibase:quantityAmount"--> v13 bind4[/"numeric-abs(?point2 - ?point1)"/] v13 --o bind4 v12 --o bind4 bind4 --as--o v14