query-4c929ef66089a1e57b6660dd9042d203

rq turtle/ttl

Propertiesinstance of (P31)shares border with (P47)

Use at

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#>
PREFIX schema: <http://schema.org/>

 SELECT ?item ?itemLabel ?itemDescription ?shares_border_with ?shares_border_withLabel WHERE {
  ?item wdt:P31 wd:Q493522.         # municipality of Belgium
  ?item wdt:P47 ?shares_border_with.        # sharing boarder
  SERVICE wikibase:label { bd:serviceParam wikibase:language "nl". }
  FILTER(NOT EXISTS {
    ?shares_border_with wdt:P47 ?item
  })  
 }
 ORDER BY ?itemDescription

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?item"):::projected v1("?itemDescription"):::projected v2("?shares_border_with"):::projected c5(["bd:serviceParam"]):::iri c3(["wd:Q493522"]):::iri c7(["nl"]):::literal f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"wdt:P47"--> e0v2 e0v2("?item"):::projected e0v1("?shares_border_with"):::projected end f0--EXISTS--> f0e0 f0 --> v2 f0 --> c1 f0 --> v3 v2 --"wdt:P47"--> v3 v3 --"wdt:P31"--> c3 v3 --"wdt:P47"--> v2 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c5 --"wikibase:language"--> c7 end