Question: Which movie is longer, The Matrix or Hamilton (the one whose narrative location is Russia)?
Choices:
A Prairie Home Companion
The Matrix
Rebecca
Talk to Her
The Towering Inferno
Hamilton
The Hunchback of Notre Dame
Training Day
Pleasantville
The Fifth Element
Program:
function: Find
inputs: The Matrix
function: Find
inputs: Russia
function: Relate
dependencies: 1
inputs: narrative location
backward
function: Find
inputs: Hamilton
function: And
dependencies: 2
3
function: SelectBetween
dependencies: 0
4
inputs: duration
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "The Matrix" .  } UNION { ?e <pred:name> "Hamilton" . ?e <narrative_location> ?e_1 . ?e_1 <pred:name> "Russia" .   } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: The Matrix