what is the {end time} for {Vicente Guerrero} has {position held} as {President of Mexico} ?
What date was the end of Vincete Guerroro's term as President of Mexico?
When did Vicente Guerroro end his time as President of Mexico?
SELECT ?p WHERE { ?v property:position_held resource:President_of_Mexico . ?v property:end_time ?p . resource:Vicente_Guerrero property:position_held ?v }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q315618> .
?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/Q628004> .
?statement <http://www.wikidata.org/entity/P582> ?value. 
} 

SELECT ?value WHERE { wd:Q315618 p:P39 ?s . ?s ps:P39 wd:Q628004 . ?s pq:P582 ?value}