query-e285691ddd0c00bfb12535c661012cdd
مجمعة لكل بلدية على محور ي، أبجديا grouped per municipality on x-axis, alphabetically grouped per municipality on x-axis, alphabetically seskupené podle obcí na ose x, abecedně grouped per municipality on x-axis, alphabetically gruppiert nach Gemeinde auf der x-Achse, geordnet nach Namen grouped per municipality on x-axis, alphabetically grouped per municipality on x-axis, alphabetically grouped per municipality on x-axis, alphabetically grouped per municipality on x-axis, alphabetically grouped per municipality on x-axis, alphabetically groupées alphabétiquement par ville, sur les abscisses grouped per municipality on x-axis, alphabetically grouped per municipality on x-axis, alphabetically grouped per municipality on x-axis, alphabetically raggruppati per comune sulle ascisse, in ordine alfabetico grouped per municipality on x-axis, alphabetically grouped per municipality on x-axis, alphabetically grouped per municipality on x-axis, alphabetically grouped per municipality on x-axis, alphabetically grouped per municipality on x-axis, alphabetically gegroepeerd per gemeente op x-as, alfabetisch grouped per municipality on x-axis, alphabetically grouped per municipality on x-axis, alphabetically grouped per municipality on x-axis, alphabetically grouped per municipality on x-axis, alphabetically grouped per municipality on x-axis, alphabetically grupperade efter kommun i en x-axel, alfabetiskt grouped per municipality on x-axis, alphabetically grouped per municipality on x-axis, alphabetically згруповані за муніципалітетами по осі x в алфавітному порядку grouped per municipality on x-axis, alphabetically grouped per municipality on x-axis, alphabetically
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX geof: <http://www.opengis.net/def/function/geosparql/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:ScatterChart
PREFIX var_muntype: <http://www.wikidata.org/entity/Q15284>
PREFIX var_area: <http://www.wikidata.org/entity/Q6308>
SELECT ?from (?distGrp1 AS ?kilometers) ?to WHERE {
{ SELECT ?mun (SAMPLE(?loc) AS ?loc)
WHERE { ?mun wdt:P31/wdt:P279* var_muntype:;
wdt:P131 var_area:;
wdt:P625 ?loc. }
GROUP BY ?mun
}
OPTIONAL {
{ SELECT (?mun AS ?mun2) (SAMPLE(?loc) AS ?loc2)
WHERE { ?mun wdt:P31/wdt:P279* var_muntype:;
wdt:P131 var_area:;
wdt:P625 ?loc. }
GROUP BY ?mun
}
}
BIND(geof:distance(?loc, ?loc2) AS ?distNum).
BIND(STR(ROUND(?distNum)) AS ?distGrp0).
BIND(CONCAT(SUBSTR("000",STRLEN(?distGrp0)+1),?distGrp0,".",STR(ROUND((?distNum-FLOOR(?distNum))*10))," km") AS ?distGrp1).
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en".
?mun rdfs:label ?from.
?mun2 rdfs:label ?to.
}
}
ORDER BY ?from ?kilometers
Query found at
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/ar
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/be-tarask
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/ca
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/cs
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/da
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/de
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/en
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/en-gb
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/eo
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/es
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/eu
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/fr
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/he
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/hy
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/id
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/it
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/ja
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/ko
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/lb
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/lt
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/ms
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/nl
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/pl
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/pt-br
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/ro
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/ru
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/si
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/sv
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/th
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/tr
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/uk
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/vec
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/zh