Question: Which movie is shorter,, The Master (the one whose genre is action film) or Gods and Monsters?
Choices:
Pleasantville
Talk to Her
Rebecca
Gods and Monsters
The Master
A Prairie Home Companion
The Towering Inferno
Training Day
The Hunchback of Notre Dame
The Fifth Element
Program:
function: Find
inputs: action film
function: Relate
dependencies: 0
inputs: genre
backward
function: Find
inputs: The Master
function: And
dependencies: 1
2
function: Find
inputs: Gods and Monsters
function: SelectBetween
dependencies: 3
4
inputs: duration
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "The Master" . ?e <genre> ?e_1 . ?e_1 <pred:name> "action film" .   } UNION { ?e <pred:name> "Gods and Monsters" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: The Master