What is {position held} of {Radomir Putnik} and {end time}
What was Radomir Putnik's position and when did it end?
which position did Radomir Putnik hold and when did it end?
SELECT ?g ?z WHERE { ?f property:end_time ?g . . ?f property:position_held ?z . resource:Radomir_Putnik property:position_held ?f }
select distinct ?dataprop1 ?obj where { ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q313133> . ?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> ?obj . ?statement <http://www.wikidata.org/entity/P580> ?dataprop1 . } 
SELECT ?value1 ?obj WHERE { wd:Q313133 p:P39 ?s . ?s ps:P39 ?obj . ?s pq:P582 ?value1 . }