what is the {end time} for {Bruges} has {located in the administrative territorial entity} as {County of Flanders} ?
In Flanders County, when did Bruges die?
When did Bruges die in Flanders County?
SELECT ?c WHERE { resource:Bruges property:located_in_the_administrative_territorial_entity ?l . ?l property:located_in_the_administrative_territorial_entity resource:County_of_Flanders . ?l property:end_time ?c }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q12994> .
?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/Q157070> .
?statement <http://www.wikidata.org/entity/P582> ?value. 
} 

SELECT ?value WHERE { wd:Q12994 p:P131 ?s . ?s ps:P131 wd:Q157070 . ?s pq:P582 ?value}