query-4f9135498243b5b74e2315a06ba8318d

rq turtle/ttl

TODO

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX psn: <http://www.wikidata.org/prop/statement/value-normalized/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT ?item ?p518_1 ?h1 ?p518_2 ?h2 {
  ?item p:P2044 ?h1stm .
  ?h1stm psn:P2044 [ wikibase:quantityAmount ?h1 ] .
  OPTIONAL { ?h1stm pq:P518 ?p518_1 }
  ?item p:P2044 ?h2stm .
  ?h2stm psn:P2044 [ wikibase:quantityAmount ?h2 ] .
  OPTIONAL { ?h2stm pq:P518 ?p518_2 }
  FILTER( ?h1 - ?h2 > 500 )
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?h1"):::projected v4("?h1stm") v2("?h2"):::projected v6("?h2stm") v3("?item"):::projected v5("?p518_1"):::projected v7("?p518_2"):::projected a1((" ")) a2((" ")) f0[["?h1 - ?h2 > '500^^xsd:integer'"]] f0 --> v1 f0 --> v2 v3 --"p:P2044"--> v4 a1 --"wikibase:quantityAmount"--> v1 v4 --"p:statement/value-normalized/P2044"--> a1 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v4 -."p:qualifier/P518".-> v5 end v3 --"p:P2044"--> v6 a2 --"wikibase:quantityAmount"--> v2 v6 --"p:statement/value-normalized/P2044"--> a2 subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v6 -."p:qualifier/P518".-> v7 end