Question: Which movie is shorter, Astro Boy (the one whose composer is John Ottman) or Hercules (the one whose box office is 252712101 United States dollar)?
Choices:
Hercules
Astro Boy
Shrek 2
Renaissance
Beauty and the Beast
Lilo & Stitch
The Rescuers
WALL·E
Aladdin
Winnie the Pooh
Answer: Astro Boy
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Astro Boy" . ?e <composer> ?e_1 . ?e_1 <pred:name> "John Ottman" . } UNION { ?e <pred:name> "Hercules" . ?e <box_office> ?pv_1 . ?pv_1 <pred:unit> "United States dollar" . ?pv_1 <pred:value> "252712101"^^xsd:double . } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Program:
function: Find
inputs: John Ottman
function: Relate
dependencies: 0
inputs: composer
backward
function: Find
inputs: Astro Boy
function: And
dependencies: 1
2
function: Find
inputs: Hercules
function: FilterNum
dependencies: 4
inputs: box office
252712101 United States dollar
=
function: SelectBetween
dependencies: 3
5
inputs: duration
greater