query-7b3c092ff9dfc3a0c9c52159deba4213
Objekte in Dresden mit Schlüsselereignissen
-------------------------------------------------------------------------------
SELECT ?item ?itemLabel #?countryLabel
?significant_eventLabel (year(?start) AS ?y1) (year(?end) AS ?y2) ?altesdresden
?propLabel ?valLabel
(year(?destroyed) AS ?yr_d)
WHERE { ?item wdt:P131 wd:Q1731 . ?item p:P793 ?stmt .
#?stmt ps:P793 wd:Q1441983 . # Filter für bestimmte Ereignisse OPTIONAL {?stmt ps:P793 ?significant_event.} . OPTIONAL {?stmt pq:P580|pq:P585 ?start} . OPTIONAL {?stmt pq:P582 ?end} . OPTIONAL { ?stmt ?pq ?val . ?pq ^wikibase:qualifier ?prop . FILTER(?prop NOT IN (wd:P580, wd:P582, wd:P585, wd:P793, wd:P18)) . } #OPTIONAL {?item wdt:P17 ?country } . #OPTIONAL {?item wdt:P576 ?destroyed } . #OPTIONAL {?item wdt:P11855 ?altesdresden } . SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } order by ?y1
ORDER BY xsd:integer(STRAFTER(str(?item), 'Q')) ?start ?propLabel
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#-------------------------------------------------------------------------------
# Objekte in Dresden mit Schlüsselereignissen
#-------------------------------------------------------------------------------
SELECT ?item ?itemLabel #?countryLabel
?significant_eventLabel (year(?start) AS ?y1) (year(?end) AS ?y2) ?altesdresden
?propLabel ?valLabel
#(year(?destroyed) AS ?yr_d)
WHERE {
?item wdt:P131 wd:Q1731 .
?item p:P793 ?stmt .
#?stmt ps:P793 wd:Q1441983 . # Filter für bestimmte Ereignisse
OPTIONAL {?stmt ps:P793 ?significant_event.} .
OPTIONAL {?stmt pq:P580|pq:P585 ?start} .
OPTIONAL {?stmt pq:P582 ?end} .
OPTIONAL {
?stmt ?pq ?val .
?pq ^wikibase:qualifier ?prop .
FILTER(?prop NOT IN (wd:P580, wd:P582, wd:P585, wd:P793, wd:P18)) .
}
#OPTIONAL {?item wdt:P17 ?country } .
#OPTIONAL {?item wdt:P576 ?destroyed } .
#OPTIONAL {?item wdt:P11855 ?altesdresden } .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
order by ?y1
#ORDER BY xsd:integer(STRAFTER(str(?item), 'Q')) ?start ?propLabel