query-957e558de82f2c523cc7d24c4f197a67

rq turtle/ttl

Propertiesinstance of (P31)located in the administrative territorial entity (P131)named after (P138)Commons category (P373)OpenStreetMap way ID (P10689)OpenStreetMap relation ID (P402)connects with (P2789)

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#>
SELECT ?geschlossene_Ortschaft ?benannt_nach ?benannt_nachLabel ?Commons_Kategorie ?OpenStreetMap_Linienkennung ?OpenStreetMap_Relationskennung ?physisch_verbunden_mit ?physisch_verbunden_mitLabel WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". }
  ?geschlossene_Ortschaft wdt:P31 wd:Q79007.
  ?geschlossene_Ortschaft wdt:P131 wd:Q3012.
  OPTIONAL { ?geschlossene_Ortschaft wdt:P138 ?benannt_nach. }
  OPTIONAL {  }
  OPTIONAL { ?geschlossene_Ortschaft wdt:P373 ?Commons_Kategorie. }
  OPTIONAL { ?geschlossene_Ortschaft wdt:P10689 ?OpenStreetMap_Linienkennung. }
  OPTIONAL { ?geschlossene_Ortschaft wdt:P402 ?OpenStreetMap_Relationskennung. }
  OPTIONAL { ?geschlossene_Ortschaft wdt:P2789 ?physisch_verbunden_mit. }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?Commons_Kategorie"):::projected v4("?OpenStreetMap_Linienkennung"):::projected v5("?OpenStreetMap_Relationskennung"):::projected v2("?benannt_nach"):::projected v1("?geschlossene_Ortschaft"):::projected v6("?physisch_verbunden_mit"):::projected c6(["wd:Q79007"]):::iri c4(["#91;AUTO_LANGUAGE#93;,mul,en"]):::literal c2(["bd:serviceParam"]):::iri c8(["wd:Q3012"]):::iri subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c2 --"wikibase:language"--> c4 end v1 --"wdt:P31"--> c6 v1 --"wdt:P131"--> c8 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P138".-> v2 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P373".-> v3 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P10689".-> v4 end subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P402".-> v5 end subgraph optional5["(optional)"] style optional5 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P2789".-> v6 end