query-7d1e3bdd121ac7d9d0badd6633b24f51

rq turtle/ttl

Propertieslocated in the administrative territorial entity (P131)inHerit Place Number (P2618)located on street (P669)OpenStreetMap relation ID (P402)named after (P138)coordinate location (P625)house number (P670)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?inheritId ?streetLabel ?streetNumber ?osmRelation ?namedAfterLabel ?coords WHERE {
  ?item wdt:P131 wd:Q1455046 .
  ?item wdt:P2618 ?inheritId .
  OPTIONAL { ?item wdt:P669 ?street }
  OPTIONAL { ?item p:P669/pq:P670 ?streetNumber }
  OPTIONAL { ?item wdt:P402 ?osmRelation }
  OPTIONAL { ?item wdt:P138 ?namedAfter }
  OPTIONAL { ?item wdt:P625 ?coords }
  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; v7("?coords"):::projected v2("?inheritId"):::projected v1("?item"):::projected v6("?namedAfter") v5("?osmRelation"):::projected v3("?street") v4("?streetNumber"):::projected a1((" ")) c2(["wd:Q1455046"]):::iri c11(["bd:serviceParam"]):::iri c13(["#91;AUTO_LANGUAGE#93;,en"]):::literal v1 --"p:direct/P131"--> c2 v1 --"p:direct/P2618"--> v2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P669".-> v3 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:P669".-> a1 a1 --"p:qualifier/P670"--> v4 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P402".-> v5 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P138".-> v6 end subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P625".-> v7 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c11 --"wikibase:language"--> c13 end