what is the {end time} for {Order of Saint John (Bailiwick of Brandenburg)} has {manager/director} as {Hermann von Werberg} ?
Hermann von Werberg was the  manager/director of Order of Saint John (Bailiwick of Brandenburg) until what year?
When did the Hermann von Werberg stop being the manager/director of Order of Saint John (Bailiwick of Brandenburg)?
SELECT ?v WHERE { resource:Order_of_Saint_John_(Bailiwick_of_Brandenburg) property:director_/_manager ?k . ?k property:director_/_manager resource:Hermann_von_Werberg . ?k property:end_time ?v }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q4498889> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P1037> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q15815394> .
?statement <http://www.wikidata.org/entity/P582> ?value. 
} 

SELECT ?value WHERE { wd:Q4498889 p:P1037 ?s . ?s ps:P1037 wd:Q15815394 . ?s pq:P582 ?value}