query-f9b6b6f02f2cd71e4d2dc8e0ae8919cb
URL verlinken in Ausgabe SELECT ?item ?itemLabel ?value ?country ?capitelLabel ?coordinate (URI(CONCAT("https://www.openstreetmap.org/relation/",?osm)) as ?osm_link) WHERE { ?item wdt:P8119 ?value . ?item wdt:P17 ?country .
OPTIONAL {?item wdt:P402 ?osm .}
?item wdt:P36 ?capitel .
OPTIONAL {?capitel wdt:P625 ?coordinate .}
SERVICE wikibase:label { bd:serviceParam wikibase:language "de,en" }
}
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# URL verlinken in Ausgabe
SELECT ?item ?itemLabel ?value ?country ?capitelLabel ?coordinate
(URI(CONCAT("https://www.openstreetmap.org/relation/",?osm)) as ?osm_link)
WHERE
{
?item wdt:P8119 ?value .
?item wdt:P17 ?country .
OPTIONAL {?item wdt:P402 ?osm .}
?item wdt:P36 ?capitel .
OPTIONAL {?capitel wdt:P625 ?coordinate .}
SERVICE wikibase:label { bd:serviceParam wikibase:language "de,en" }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?capitel")
v6("?coordinate"):::projected
v3("?country"):::projected
v1("?item"):::projected
v4("?osm"):::projected
v7("?osm_link")
v2("?value"):::projected
c7(["bd:serviceParam"]):::iri
c9(["de,en"]):::literal
v1 --"wdt:P8119"--> v2
v1 --"wdt:P17"--> v3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P402".-> v4
end
v1 --"wdt:P36"--> v5
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v5 -."wdt:P625".-> v6
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end
bind0[/"concat('https://www.openstreetmap.org/relation/',?osm)"/]
v4 --o bind0
bind0 --as--o v7