query-bd2812694f0a53d73275a29faf725703
...only from berlin & Brandenburg
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 ?p ?pLabel ?w ?wLabel ?geo
WHERE {
?p wdt:P101 wd:Q30089794 .
?p wdt:P31 wd:Q679206 .
?p wdt:P361 ?w .
OPTIONAL {?w wdt:P625 ?geo}
FILTER EXISTS {{ ?w wdt:P131+ wd:Q64 } UNION { ?w wdt:P131+ wd:Q1208}}
SERVICE wikibase:label {bd:serviceParam wikibase:language "en,de"}
} ORDER BY ASC(?instanceLabel)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?geo"):::projected
v1("?instanceLabel")
v3("?p"):::projected
v2("?w"):::projected
c3(["wd:Q1208"]):::iri
c13(["en,de"]):::literal
c2(["wd:Q64"]):::iri
c7(["wd:Q679206"]):::iri
c11(["bd:serviceParam"]):::iri
c5(["wd:Q30089794"]):::iri
f0[[" "]]
subgraph f0e0["Exists Clause"]
subgraph unione00[" Union "]
subgraph unione00l[" "]
style unione00l fill:#abf,stroke-dasharray: 3 3;
e0v1 --"wdt:P131"--> e0c3
end
subgraph unione00r[" "]
style unione00r fill:#abf,stroke-dasharray: 3 3;
e0v1 --"wdt:P131"--> e0c2
end
unione00r <== or ==> unione00l
end
e0v1("?w"):::projected
e0c3(["wd:Q1208"]):::iri
e0c2(["wd:Q64"]):::iri
end
f0--EXISTS--> f0e0
f0 --> v2
f0 --> c1
f0 --> c2
f0 --> c3
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P131"--> c3
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P131"--> c2
end
union0r <== or ==> union0l
end
v3 --"wdt:P101"--> c5
v3 --"wdt:P31"--> c7
v3 --"wdt:P361"--> v2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P625".-> v4
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
end