Question: Which one has more running time between The King and I (the one whose genre is films based on literature) and Monsters, Inc. (the one whose release region is Japan)?
Choices:
Renaissance
Aladdin
The Rescuers
Shrek 2
Lilo & Stitch
Monsters, Inc.
Peter Pan
The King and I
Beauty and the Beast
Winnie the Pooh
Program:
function: Find
inputs: film based on literature
function: Relate
dependencies: 0
inputs: genre
backward
function: Find
inputs: The King and I
function: And
dependencies: 1
2
function: Find
inputs: Japan
function: Relate
dependencies: 4
inputs: film release region
backward
function: Find
inputs: Monsters, Inc.
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: duration
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "The King and I" . ?e <genre> ?e_1 . ?e_1 <pred:name> "film based on literature" .   } UNION { ?e <pred:name> "Monsters, Inc." . ?e <film_release_region> ?e_2 . ?e_2 <pred:name> "Japan" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Monsters, Inc.