what is the {end time} for {Sevastopol} has {located in the administrative territorial entity} as {Ukrainian Soviet Socialist Republic} ?
When was Sevastopol placed in the USSR?
When was Sevastopol placed in the administrative territorial entity of Ukrainian Soviet Socialist Republic?
SELECT ?l WHERE { ?h property:located_in_the_administrative_territorial_entity resource:Ukrainian_Soviet_Socialist_Republic . ?h property:end_time ?l . resource:Sevastopol property:located_in_the_administrative_territorial_entity ?h }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q7525> .
?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/Q133356> .
?statement <http://www.wikidata.org/entity/P582> ?value. 
} 

SELECT ?value WHERE { wd:Q7525 p:P131 ?s . ?s ps:P131 wd:Q133356 . ?s pq:P582 ?value}