Question: Which has higher elevation above sea level, Kentucky (the one that shares border with Indiana) or Wyoming (the one whose demonym is Wyomingian)?
Choices:
Massachusetts
New Mexico
Hawaii
Illinois
California
New Jersey
Wyoming
Colorado
Iowa
Kentucky
Answer: Wyoming
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Kentucky" . ?e_1 <shares_border_with> ?e . ?e_1 <pred:name> "Indiana" . } UNION { ?e <pred:name> "Wyoming" . ?e <demonym> ?pv_1 . ?pv_1 <pred:value> "Wyomingian" . } ?e <elevation_above_sea_level> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Program:
function: Find
inputs: Indiana
function: Relate
dependencies: 0
inputs: shares border with
forward
function: Find
inputs: Kentucky
function: And
dependencies: 1
2
function: Find
inputs: Wyoming
function: FilterStr
dependencies: 4
inputs: demonym
Wyomingian
function: SelectBetween
dependencies: 3
5
inputs: elevation above sea level
greater