query-bb8cf58d2ccfd1869d62b14393547ab3
Incorrect use of bounds. (P2067)mass Can be done with all quantity properties, not just
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?length ?upperBound ?lowerBound {
?item p:P106/ps:P106/wdt:P279* wd:Q26270618 .
?item p:P2067 [ psv:P2067 ?value ] . # items that use P2067 (mass)
?value wikibase:quantityAmount ?length .
OPTIONAL {
?value wikibase:quantityUpperBound ?upperBound; wikibase:quantityLowerBound ?lowerBound .
}
SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?item"):::projected
v3("?length"):::projected
v5("?lowerBound"):::projected
v4("?upperBound"):::projected
v2("?value")
a1((" "))
a2((" "))
a3((" "))
c13(["en"]):::literal
c11(["bd:serviceParam"]):::iri
c4(["wd:Q26270618"]):::iri
v1 --"p:P106"--> a1
a1 --"p:statement/P106"--> a2
a2 --"p:direct/P279"--> c4
a3 --"p:statement/value/P2067"--> v2
v1 --"p:P2067"--> a3
v2 --"wikibase:quantityAmount"--> v3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wikibase:quantityUpperBound".-> v4
v2 --"wikibase:quantityLowerBound"--> v5
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
end