With this query, I can get a list of German cities around Berlin, within a radius of 50 km.
SELECT ?place ?placeLabel ?location WHERE
{
wd:Q64 wdt:P625 ?arcLoc .
?place wdt:P31 wd:Q515 .
?place wdt:P17 wd:Q183 .
SERVICE wikibase:around {
?place wdt:P625 ?location .
bd:serviceParam wikibase:center ?arcLoc .
bd:serviceParam wikibase:radius "50" .
}
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .
}
}
How can I sort the result by proximity in Km, like it is done in this page?