what is the {end time} for {Königsberg} has {located in the administrative territorial entity} as {East Prussia} ?
What was the last year during which Konigsberg was stiill a part of the administrative territorial entity of East Prussia ?
When did Konigsberg stop being located in the administrative territorial entity of East Prussia ?
SELECT ?l WHERE { ?b property:located_in_the_administrative_territorial_entity resource:East_Prussia . resource:Königsberg property:located_in_the_administrative_territorial_entity ?b . ?b property:end_time ?l }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q4120832> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P131> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q103801> .
?statement <http://www.wikidata.org/entity/P582> ?value. 
} 

SELECT ?value WHERE { wd:Q4120832 p:P131 ?s . ?s ps:P131 wd:Q103801 . ?s pq:P582 ?value}