What is {country} of {Vinnytsia Oblast} that is {end time} is {1991-8-23} ?
Give me the name of the country of Vinnutsia Oblast until 1991.
Which was the country of Vinnutsia Oblast till 1991?
SELECT ?u WHERE { resource:Vinnytsia_Oblast property:country ?w . FILTER ( CONTAINS ( YEAR ( ?q ) , '1991' ) ) . ?w property:country ?u . ?w property:end_time ?q }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q166709> .
?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/P582> <1991-8-23>
} 

SELECT ?obj WHERE { wd:Q166709 p:P17 ?s . ?s ps:P17 ?obj . ?s pq:P582 ?x filter(contains(YEAR(?x),'1991')) }