query-34ee49c6cb1c2438e3a7d3ba1528d9f6
Event venues without country, but with location
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#>
#-------------------------------------------------------
# EN: event venues without country (Property:P17), but with location
# DE: Veranstaltungsorte ohne Staat (Property:P17), aber mit Ort
#-------------------------------------------------------
#defaultView:Table,Map
SELECT distinct ?item ?itemLabel ?coordinate ?locationLabel ?countryLabel
WHERE {
?item (wdt:P31/wdt:P279*) wd:Q18674739. # all event venues
MINUS { ?item wdt:P17 [] } . # without country
OPTIONAL {?item wdt:P625 ?coordinate.}
?item wdt:P276 ?location.
?location wdt:P17 ?country.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,de" }
}
order by ?countryLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?coordinate"):::projected
v5("?country")
v1("?countryLabel"):::projected
v2("?item"):::projected
v4("?location")
a2((" "))
a1((" "))
c8(["bd:serviceParam"]):::iri
c3(["wd:Q18674739"]):::iri
c10(["#91;AUTO_LANGUAGE#93;,en,de"]):::literal
v2 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c3
subgraph minus0["MINUS"]
style minus0 stroke-width:6px,fill:pink,stroke:red;
v2 --"wdt:P17"--> a2
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P625".-> v3
end
v2 --"wdt:P276"--> v4
v4 --"wdt:P17"--> v5
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end