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