What is {instance of} of {Bavaria} that is {end time} is {1945-0-0} ?
none
What in Bavaria ended at 1945-0-0?
SELECT ?b WHERE { FILTER ( CONTAINS ( YEAR ( ?r ) , '1945' ) ) . ?l property:end_time ?r . ?l rdf:type ?b . resource:Bavaria rdf:type ?l }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q980> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P31> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
?statement <http://www.wikidata.org/entity/P582> <1945-0-0>
} 

SELECT ?obj WHERE { wd:Q980 p:P31 ?s . ?s ps:P31 ?obj . ?s pq:P582 ?x filter(contains(YEAR(?x),'1945')) }