what is the {end time} for {Republic of Venice} has {instance of} as {state} ?
On what date did the Republic of Venice become a state?
When did the Republic of Venice become a state?
SELECT ?k WHERE { FILTER ( CONTAINS ( ?w , 'http://dbpedia.org/ontology/State' ) ) . ?j rdf:type ?w . resource:Republic_of_Venice rdf:type ?j . ?j property:end_time ?k }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q4948> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P31> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://dbpedia.org/ontology/State> .
?statement <http://www.wikidata.org/entity/P582> ?value. 
} 

SELECT ?value WHERE { wd:Q4948 p:P31 ?s . ?s ps:P31 ?x filter(contains(?x , 'http://dbpedia.org/ontology/State')) . ?s pq:P582 ?value}