what is the {end time} for {Ravenna} has {country} as {Republic of Venice} ?
The country of Ravenna in the Republic of Venice was terminated in what year?
What time did the country of Ravenna in the Republic of Venice end?
SELECT ?j WHERE { ?r property:end_time ?j . resource:Ravenna property:country ?r . ?r property:country resource:Republic_of_Venice }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q13364> .
?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> <http://wikidata.dbpedia.org/resource/Q4948> .
?statement <http://www.wikidata.org/entity/P582> ?value. 
} 

SELECT ?value WHERE { wd:Q13364 p:P17 ?s . ?s ps:P17 wd:Q4948 . ?s pq:P582 ?value}