query-fade6b62061abafbc0ad3e3e2de70b38

rq turtle/ttl

Display villages in the specific radius from a spacific place

SELECT ?place ?placeLabel ?location WHERE { wd:Q7264829 wdt:P625 ?polvillLoc. SERVICE wikibase:around { ?place wdt:P625 ?location. bd:serviceParam wikibase:center ?polvillLoc; wikibase:radius "27". } FILTER(EXISTS { ?place wdt:P31 wd:Q3558970. }) SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }

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#>
#Display villages in the specific radius from a spacific place

SELECT ?place ?placeLabel ?location WHERE {
  wd:Q7264829 wdt:P625 ?polvillLoc.
  SERVICE wikibase:around {
    ?place wdt:P625 ?location.
    bd:serviceParam wikibase:center ?polvillLoc;
      wikibase:radius "27".
  }
  FILTER(EXISTS { ?place wdt:P31 wd:Q3558970. })
  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; v3("?location"):::projected v1("?place"):::projected v2("?polvillLoc") c6(["bd:serviceParam"]):::iri c9(["27"]):::literal c12(["#91;AUTO_LANGUAGE#93;,en"]):::literal c2(["wd:Q3558970"]):::iri c3(["wd:Q7264829"]):::iri f0[[" "]] subgraph f0e0["Exists Clause"] e0v1 --"wdt:P31"--> e0c2 e0v1("?place"):::projected e0c2(["wd:Q3558970"]):::iri end f0--EXISTS--> f0e0 f0 --> v1 f0 --> c1 f0 --> c2 v1 --"wdt:P31"--> c2 c3 --"wdt:P625"--> v2 subgraph s1["http://wikiba.se/ontology#around"] style s1 stroke-width:4px; v1 --"wdt:P625"--> v3 c6 --"wikibase:center"--> v2 c6 --"wikibase:radius"--> c9 end subgraph s2["http://wikiba.se/ontology#label"] style s2 stroke-width:4px; c6 --"wikibase:language"--> c12 end