what is the {end time} for {Sigismund III Vasa} has {position held} as {Kings of Poland} ?
Sigismund III Vasa was King of Poland, when did his reign end?
When did the reign of Sigismund III Vasa as King of Poland end?
SELECT ?f WHERE { ?l property:position_held resource:king_of_Poland . ?l property:end_time ?f . resource:Sigismund_III_Vasa property:position_held ?l }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q52940> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P39> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q3273712> .
?statement <http://www.wikidata.org/entity/P582> ?value. 
} 

SELECT ?value WHERE { wd:Q52940 p:P39 ?s . ?s ps:P39 wd:Q3273712 . ?s pq:P582 ?value}