query-6b0ae4b5f6acdf352a7f3153448a4406
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 bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?coord1 ?coord2 WHERE {
?item wdt:P17 wd:Q35 . # in Denmark
?item wdt:P31 ?type . ?type wdt:P279* wd:Q486972 . # settlement
?item wdt:P625 ?coord1 .
?item wdt:P625 ?coord2 .
filter ( ?coord1 != ?coord2 ) . # not the same
# SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en,[AUTO_LANGUAGE]". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?coord1"):::projected
v2("?coord2"):::projected
v3("?item"):::projected
v4("?type")
c5(["wd:Q486972"]):::iri
c2(["wd:Q35"]):::iri
f0[["?coord1 != ?coord2"]]
f0 --> v1
f0 --> v2
v3 --"wdt:P17"--> c2
v3 --"wdt:P31"--> v4
v4 --"wdt:P279"--> c5
v3 --"wdt:P625"--> v1
v3 --"wdt:P625"--> v2