User:Stefan Kühn/Event venue
English: SPARQL queries for event venue (Q18674739) in Wikidata
Deutsch: SPARQL-Abfragen für event venue (Q18674739) in Wikidata
Event venues in general edit
Only event venues edit
#-------------------------------------------------------
# EN: Only event venues (no subcategories)
# DE: Nur Veranstaltungsorte (keine Unterkategorien)
#-------------------------------------------------------
#defaultView:Map,Table
SELECT distinct ?item ?itemLabel ?coordinate ?image
WHERE {
?item wdt:P31 wd:Q18674739. # only event venues
OPTIONAL {?item wdt:P625 ?coordinate.} # coordinate
OPTIONAL {?item wdt:P18 ?image.} #
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,de" }
}
Event venues without country edit
#-------------------------------------------------------
# EN: event venues without country (Property:P17)
# DE: Veranstaltungsorte ohne Staat (Property:P17)
#-------------------------------------------------------
#defaultView:Map,Table
SELECT distinct ?item ?itemLabel ?coordinate ?image
WHERE {
?item (wdt:P31/wdt:P279*) wd:Q18674739. # all event venues
MINUS { ?item wdt:P17 [] } . # without country
OPTIONAL {?item wdt:P625 ?coordinate.}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,de" }
}
Event venues without country, but with OSM edit
#-------------------------------------------------------
# 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)
Event venues without country, but with location edit
#-------------------------------------------------------
# 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
Event venues without country, but is part of edit
#-------------------------------------------------------
# EN: event venues without country (Property:P17), but is part of
# DE: Veranstaltungsorte ohne Staat (Property:P17), aber ist Teil von
#-------------------------------------------------------
#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:P361 ?location. # is part of
?location wdt:P17 ?country.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,de" }
}
order by ?countryLabel
Event venues in country (Germany) edit
#-------------------------------------------------------
# EN: Event venues in Germany
# DE: Veranstaltungsorte in Deutschland
#-------------------------------------------------------
#defaultView:Map,Table
SELECT distinct ?item ?itemLabel ?coordinate ?image
WHERE {
?item (wdt:P31/wdt:P279*) wd:Q18674739. # all event venues
?item wdt:P17 wd:Q183. # country = DE
OPTIONAL {?item wdt:P625 ?coordinate.} # coordinate
OPTIONAL {?item wdt:P18 ?image.} #
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,de" }
}
Event venues in Germany without administrative unit edit
#-------------------------------------------------------
# EN: Event venues in Germany without administrative unit (Property:P131)
# DE: Veranstaltungsorte in Deutschland ohne Verwaltungseinheit (Property:P131)
#-------------------------------------------------------
#defaultView:Map,Table
SELECT ?item ?itemLabel ?coordinate ?image
WHERE {
?item (wdt:P31/wdt:P279*) wd:Q18674739. # all event venues
?item wdt:P17 wd:Q183. # country = DE
MINUS { ?item wdt:P131 [] } . # is located in
OPTIONAL {?item wdt:P625 ?coordinate.}
optional {?item wdt:P18 ?image.}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,de" }
}
Event venues in state (Saxony) edit
#defaultView:Map,Table
SELECT distinct ?item ?itemLabel ?itemDescription ?image ?coord ?verwaltungseinheitLabel ?streetLabel ?zip ?adress ?website
WITH {
SELECT distinct ?region # Unterabfrage für alle Verwaltungseinheiten (Kreise, Städte, Gemeinden, Ortsteile, etc.)
WHERE {
hint:Query hint:optimizer "None" .
BIND(wd:Q1202 AS ?state). # liegt in Sachsen
?region wdt:P131* ?state.
MINUS { ?region wdt:P576 _:b0. } # ohne Auflösungsdatum
}
} AS %region
WHERE {
INCLUDE %region.
?item wdt:P131 ?region.
#?item (wdt:P31/wdt:P279*) wd:Q33506 . # ist ein Museum (oder Unterklasse)
?item (wdt:P31/wdt:P279*) wd:Q18674739 . # ist ein Veranstaltungsort (oder Unterklasse)
MINUS { ?item wdt:P582 _:b1.} # ohne Endzeitpunkt
MINUS { ?item wdt:P576 _:b2.} # ohne Auflösungsdatum
MINUS { ?item wdt:P3999 _:b3.} # ohne Schließungsdatum
MINUS { ?item wdt:P31 wd:Q19860854 } # abgegangenes Bauwerk
MINUS { ?item wdt:P31 wd:Q15893266 } # ehemalige Entität
OPTIONAL { ?item wdt:P18 ?image . }
OPTIONAL { ?item wdt:P625 ?coord. }
OPTIONAL { ?item wdt:P669 ?street. }
OPTIONAL { ?item wdt:P281 ?zip. }
OPTIONAL { ?item wdt:P6375 ?adress. }
OPTIONAL { ?item wdt:P856 ?website. }
OPTIONAL { ?item wdt:P131 ?verwaltungseinheit. }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],de,en". }
}