Question: Which capital on the continent of Asia (where Myanmar is located) has the highest elevation above sea level?
Choices:
Doha
Bhopal
Sarajevo
Bangalore
Istanbul
Moscow
Lausanne
Tehran
Mexico City
Lucknow
Program:
function: Find
inputs: Myanmar
function: Relate
dependencies: 0
inputs: continent
forward
function: Find
inputs: Asia
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: continent
backward
function: FilterConcept
dependencies: 4
inputs: capital
function: SelectAmong
dependencies: 5
inputs: elevation above sea level
largest
SPARQL: SELECT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "capital" . ?e <continent> ?e_1 . ?e_1 <pred:name> "Asia" . ?e_2 <continent> ?e_1 . ?e_2 <pred:name> "Myanmar" .  ?e <elevation_above_sea_level> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Tehran