query-687bc4869084a7480774349a17d29f64
Range constraint
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?property ?propertyLabel ?amount ?min ?max WHERE {
{
SELECT ?property ?propertyLabel ?p ?psv ?pqv ?prv ?min ?max WHERE {
?property wikibase:propertyType wikibase:Quantity; wikibase:claim ?p; wikibase:statementValue ?psv; wikibase:qualifierValue ?pqv; wikibase:referenceValue ?prv .
?property p:P2302 [ ps:P2302 wd:Q21510860; pq:P2313 ?min; pq:P2312 ?max ] .
FILTER(?property NOT IN (wd:P1106)) .
SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' }
}
}.
?item ?p [ ?psv [ wikibase:quantityAmount ?amount ] ] .
FILTER(?amount < ?min|| ?amount > ?max) .
FILTER(?item NOT IN (wd:Q4115189)) .
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?amount"):::projected
v1("?item"):::projected
v4("?max"):::projected
v3("?min"):::projected
v6("?p")
v8("?pqv")
v5("?property"):::projected
v9("?prv")
v7("?psv")
a1((" "))
a3((" "))
a2((" "))
c17(["en"]):::literal
c10(["wd:Q21510860"]):::iri
c15(["bd:serviceParam"]):::iri
c4(["wikibase:Quantity"]):::iri
f0[["?item != 'wd:Q4115189'"]]
f0 --> v1
f1[["(?amount < ?min || ?amount > ?max)"]]
f1 --> v2
f1 --> v3
f1 --> v4
f2[["?property != 'wd:P1106'"]]
f2 --> v5
v5 --"wikibase:propertyType"--> c4
v5 --"wikibase:claim"--> v6
v5 --"wikibase:statementValue"--> v7
v5 --"wikibase:qualifierValue"--> v8
v5 --"wikibase:referenceValue"--> v9
a1 --"p:statement/P2302"--> c10
a1 --"p:qualifier/P2313"--> v3
a1 --"p:qualifier/P2312"--> v4
v5 --"p:P2302"--> a1
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c15 --"wikibase:language"--> c17
end
a2 --"wikibase:quantityAmount"--> v2
a3 -->v7--> a2
v1 -->v6--> a3