Question: Is there a greater elevation above sea level in Wexford or Livingston (the one whose country is United States of America)?
Choices:
Wexford
Montclair
Whanganui
Ridgewood
North Hollywood
West Orange
Princeton
Livingston
Belleville
Verona
Program:
function: Find
inputs: Wexford
function: Find
inputs: United States of America
function: Relate
dependencies: 1
inputs: country
backward
function: Find
inputs: Livingston
function: And
dependencies: 2
3
function: SelectBetween
dependencies: 0
4
inputs: elevation above sea level
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Wexford" .  } UNION { ?e <pred:name> "Livingston" . ?e <country> ?e_1 . ?e_1 <pred:name> "United States of America" .   } ?e <elevation_above_sea_level> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Livingston