Question: Which capital first recorded in writing earlier than 401 AD is highest in elevation?
Choices: Moscow
New Delhi
Manila
Dublin
Yerevan
Mexico City
Riga
Lausanne
Lisbon
Sarajevo
SPARQL: SELECT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "capital" . ?e <time_of_earliest_written_record> ?pv_1 . ?pv_1 <pred:year> ?v_1 . FILTER ( ?v_1 < 401 ) . ?e <elevation_above_sea_level> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Program:
function: FindAll
function: FilterYear
dependencies: 0
inputs: time of earliest written record
401
<
function: FilterConcept
dependencies: 1
inputs: capital
function: SelectAmong
dependencies: 2
inputs: elevation above sea level
largest
Answer: Yerevan