what is the {end time} for {Nikephoros II Phokas} has {position held} as {Byzantine emperor} ?
What year did Nikephoros II Phokas step down as Byzantine emperor?
When did Nikephoros II Phokas end his time as Byzantine emperoror?
SELECT ?i WHERE { ?w property:position_held resource:Byzantine_emperor . ?w property:end_time ?i . resource:Nikephoros_II_Phokas property:position_held ?w }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q41625> .
?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/Q18577504> .
?statement <http://www.wikidata.org/entity/P582> ?value. 
} 

SELECT ?value WHERE { wd:Q41625 p:P39 ?s . ?s ps:P39 wd:Q18577504 . ?s pq:P582 ?value}