query-4f0869c18df2651d7d41e8ec4c0f5c5f
TODO
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 p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?altitude ?pred ?val
WHERE
{
values ?item {wd:Q338235}
?item wdt:P31 wd:Q486972. # Must be a human settlement
?item p:P2044/psv:P2044/wikibase:quantityNormalized ?altitude.
?altitude ?pred ?val .
# FILTER(?altitude >= 4000). # above 4km
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?altitude"):::projected
v1("?item"):::projected
v3("?pred"):::projected
v4("?val"):::projected
a1((" "))
a2((" "))
c2(["wd:Q486972"]):::iri
c7(["bd:serviceParam"]):::iri
c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal
bind0[/VALUES ?item/]
bind0-->v1
bind00(["wd:Q338235"])
bind00 --> bind0
v1 --"p:direct/P31"--> c2
v1 --"p:P2044"--> a1
a1 --"p:statement/value/P2044"--> a2
a2 --"wikibase:quantityNormalized"--> v2
v2 -->v3--> v4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end