What is {country} of {Sumy Oblast} that is {end time} is {1991-8-23} ?
What country was Sumy Oblast a citizen of in 1991?
Sumy Oblast was a citizen of what country in 1991?
SELECT ?g WHERE { FILTER ( CONTAINS ( YEAR ( ?x ) , '1991' ) ) . resource:Sumy_Oblast property:country ?w . ?w property:end_time ?x . ?w property:country ?g }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q170446> .
?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:Q170446 p:P17 ?s . ?s ps:P17 ?obj . ?s pq:P582 ?x filter(contains(YEAR(?x),'1991')) }