query-6870dff6e662ab9e708425ba81912120
This gives a map of streets that are within 200 meter of a street named after a painter:
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 bd: <http://www.bigdata.com/rdf#>
#defaultView:Map
SELECT ?streetwithout ?streetwithoutLabel ?withoutcoordinate (COUNT(?streetwithout) as ?count) {
?street wdt:P138/wdt:P106 wd:Q1028181;
wdt:P31 wd:Q79007;
wdt:P17 wd:Q213;
wdt:P625 ?coordinate.
SERVICE wikibase:around {
?streetwithout wdt:P625 ?withoutcoordinate .
bd:serviceParam wikibase:center ?coordinate .
bd:serviceParam wikibase:radius "0.2" .
}
?streetwithout wdt:P31 wd:Q79007 .
MINUS { ?streetwithout wdt:P138 [] }
SERVICE wikibase:label {
bd:serviceParam wikibase:language "cs" .
}
} GROUP BY ?streetwithout ?streetwithoutLabel ?withoutcoordinate
HAVING (?count > 1)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?coordinate")
v6("?count")
v2("?street")
v4("?streetwithout"):::projected
v5("?withoutcoordinate"):::projected
a2((" "))
a1((" "))
c6(["wd:Q79007"]):::iri
c4(["wd:Q1028181"]):::iri
c17(["cs"]):::literal
c8(["wd:Q213"]):::iri
c11(["bd:serviceParam"]):::iri
c14(["0.2"]):::literal
f0[["?count > '1^^xsd:integer'"]]
f0 --> v6
v2 --"wdt:P138"--> a1
a1 --"wdt:P106"--> c4
v2 --"wdt:P31"--> c6
v2 --"wdt:P17"--> c8
v2 --"wdt:P625"--> v3
subgraph s1["http://wikiba.se/ontology#around"]
style s1 stroke-width:4px;
v4 --"wdt:P625"--> v5
c11 --"wikibase:center"--> v3
c11 --"wikibase:radius"--> c14
end
v4 --"wdt:P31"--> c6
subgraph minus1["MINUS"]
style minus1 stroke-width:6px,fill:pink,stroke:red;
v4 --"wdt:P138"--> a2
end
subgraph s2["http://wikiba.se/ontology#label"]
style s2 stroke-width:4px;
c11 --"wikibase:language"--> c17
end
bind3[/"count(?streetwithout)"/]
v4 --o bind3
bind3 --as--o v6