Question: Which movie is longer, Quills or Transformers (the one that has Megan Fox as a cast member)?
Choices:
The Towering Inferno
Curse of the Golden Flower
Talk to Her
Training Day
Pleasantville
The Fifth Element
Quills
Rebecca
Transformers
A Prairie Home Companion
Program:
function: Find
inputs: Quills
function: Find
inputs: Megan Fox
function: Relate
dependencies: 1
inputs: cast member
backward
function: Find
inputs: Transformers
function: And
dependencies: 2
3
function: SelectBetween
dependencies: 0
4
inputs: duration
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Quills" .  } UNION { ?e <pred:name> "Transformers" . ?e <cast_member> ?e_1 . ?e_1 <pred:name> "Megan Fox" .   } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Transformers