query-7d6154867b0b2ad08f46451ce0bab3d8
Flamur Kasa
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX geof: <http://www.opengis.net/def/function/geosparql/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?player ?playerLabel ?place ?placeLabel ?location ?dist
WHERE
{
{
SELECT ?place ?location ?loc
WHERE
{
wd:Q25444 wdt:P625 ?loc .
SERVICE wikibase:around
{
?place wdt:P625 ?location .
bd:serviceParam wikibase:center ?loc .
bd:serviceParam wikibase:radius "100" .
}
}
} ?player wdt:P31 wd:Q5 .
?player wdt:P106 wd:Q937857 .
?player wdt:P413 wd:Q193592 .
?player wdt:P19 ?place .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
BIND(geof:distance(?loc, ?location) as ?dist)
}
ORDER BY ?dist
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?dist"):::projected
v2("?loc")
v4("?location"):::projected
v3("?place"):::projected
v5("?player"):::projected
c1(["wd:Q25444"]):::iri
c13(["wd:Q193592"]):::iri
c17(["en"]):::literal
c7(["100"]):::literal
c4(["bd:serviceParam"]):::iri
c11(["wd:Q937857"]):::iri
c9(["wd:Q5"]):::iri
c1 --"wdt:P625"--> v2
subgraph s1["http://wikiba.se/ontology#around"]
style s1 stroke-width:4px;
v3 --"wdt:P625"--> v4
c4 --"wikibase:center"--> v2
c4 --"wikibase:radius"--> c7
end
v5 --"wdt:P31"--> c9
v5 --"wdt:P106"--> c11
v5 --"wdt:P413"--> c13
v5 --"wdt:P19"--> v3
subgraph s2["http://wikiba.se/ontology#label"]
style s2 stroke-width:4px;
c4 --"wikibase:language"--> c17
end
bind0[/"http://www.opengis.net/def/function/geosparql/distance(?loc,?location)"/]
v2 --o bind0
v4 --o bind0
bind0 --as--o v6