Question: Which area is smaller, Wyoming (the one that contains Rocky Mountains) or California (the one that is the headquarter location of Universal Music Group)?
Choices:
Hawaii
Kansas
Illinois
Massachusetts
California
New Mexico
Wyoming
Iowa
New Jersey
Colorado
Program:
function: Find
inputs: Rocky Mountains
function: Relate
dependencies: 0
inputs: located in the administrative territorial entity
forward
function: Find
inputs: Wyoming
function: And
dependencies: 1
2
function: Find
inputs: Universal Music Group
function: Relate
dependencies: 4
inputs: headquarters location
forward
function: Find
inputs: California
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: area
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Wyoming" . ?e_1 <located_in_the_administrative_territorial_entity> ?e . ?e_1 <pred:name> "Rocky Mountains" .   } UNION { ?e <pred:name> "California" . ?e_2 <headquarters_location> ?e . ?e_2 <pred:name> "Universal Music Group" .  } ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Wyoming