Question: Which movie made more at the box office, Cast Away or The Spy Who Loved Me (the one whose genre is action film)?
Choices:
The Fifth Element
Training Day
A Prairie Home Companion
Rebecca
Curse of the Golden Flower
The Towering Inferno
Cast Away
Pleasantville
The Hunchback of Notre Dame
The Spy Who Loved Me
Program:
function: Find
inputs: Cast Away
function: Find
inputs: action film
function: Relate
dependencies: 1
inputs: genre
backward
function: Find
inputs: The Spy Who Loved Me
function: And
dependencies: 2
3
function: SelectBetween
dependencies: 0
4
inputs: box office
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Cast Away" .  } UNION { ?e <pred:name> "The Spy Who Loved Me" . ?e <genre> ?e_1 . ?e_1 <pred:name> "action film" .   } ?e <box_office> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Cast Away