Question: What sovereign state shares a border with the historical nation that is the country of the Kingdom of Greece?
Choices:
Nauru
Holy Roman Empire
Weimar Republic
Kingdom of Bulgaria
Soviet Union
United States of America
Cambodia
Kiribati
Kingdom of Scotland
Russian Empire
Answer: Kingdom of Bulgaria
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "sovereign state" . ?e_1 <shares_border_with> ?e . ?e_1 <pred:instance_of> ?c_1 . ?c_1 <pred:name> "historical country" . ?e_2 <country> ?e_1 . ?e_2 <pred:name> "Kingdom of Greece" .   }
Program:
function: Find
inputs: Kingdom of Greece
function: Relate
dependencies: 0
inputs: country
forward
function: FilterConcept
dependencies: 1
inputs: historical country
function: Relate
dependencies: 2
inputs: shares border with
forward
function: FilterConcept
dependencies: 3
inputs: sovereign state
function: What
dependencies: 4