What is the {historical country} for {capital} of {Vilnius}
Vilnius is capital of what country?
Vilnius is capital of what country?
SELECT DISTINCT ?q WHERE { ?q rdf:type ontology:historical_country . ?q property:capital resource:Vilnius }
select distinct ?subj where { ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> ?subj . ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P36> . ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q216> . ?subj <http://www.wikidata.org/entity/P31> <http://wikidata.dbpedia.org/resource/Q3024240> } 
 select distinct ?sbj where { ?sbj wdt:P36 wd:Q216 . ?sbj wdt:P31 wd:Q3024240 } 
Lithuanian–Belorussian Soviet Socialist Republic Lithuanian Soviet Socialist Republic Polish–Lithuanian Commonwealth Republic of Central Lithuania Kingdom of Lithuania Grand Duchy of Lithuania