What is {country} of {Belgrade} and {end time}
in what nation is belgrade found and when did it end?
in what country is belgrade located and when did it end?
SELECT ?h ?y WHERE { ?u property:end_time ?h . . ?u property:country ?y . resource:Belgrade property:country ?u }
select distinct ?dataprop1 ?obj where { ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q3711> . ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P17> . ?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:Q3711 p:P17 ?s . ?s ps:P17 ?obj . ?s pq:P582 ?value1 . }