Question: Which has higher elevation above sea level, Shimla or Peterborough whose area is 58.4 square kilometres?
Choices:
Bergen
Dundee
Kilkenny
Shimla
Abidjan
Santo Domingo
Chihuahua
Trieste
Kingston
Peterborough
Program:
function: Find
inputs: Shimla
function: Find
inputs: Peterborough
function: FilterNum
dependencies: 1
inputs: area
58.4 square kilometre
=
function: SelectBetween
dependencies: 0
2
inputs: elevation above sea level
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Shimla" . } UNION { ?e <pred:name> "Peterborough" . ?e <area> ?pv_1 . ?pv_1 <pred:unit> "square kilometre" . ?pv_1 <pred:value> "58.4"^^xsd:double . } ?e <elevation_above_sea_level> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Shimla