Question: Which movie made more at the box office, Happy Feet (the one whose release region is United States of America) or Madagascar (the one whose release region is Philippines)?
Choices:
Aladdin
Madagascar
Peter Pan
Renaissance
WALL·E
Winnie the Pooh
Lilo & Stitch
Shrek 2
Happy Feet
The Rescuers
Program:
function: Find
inputs: United States of America
function: Relate
dependencies: 0
inputs: film release region
backward
function: Find
inputs: Happy Feet
function: And
dependencies: 1
2
function: Find
inputs: Philippines
function: Relate
dependencies: 4
inputs: film release region
backward
function: Find
inputs: Madagascar
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: box office
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Happy Feet" . ?e <film_release_region> ?e_1 . ?e_1 <pred:name> "United States of America" .   } UNION { ?e <pred:name> "Madagascar" . ?e <film_release_region> ?e_2 . ?e_2 <pred:name> "Philippines" .  } ?e <box_office> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Madagascar