Question: Which movie is longer, Up (the one that has Jon Voight as a cast member) or Western (the one whose duration is 120 minute)?
Choices: The Goodbye Girl
Up
The Late Shift
Shackleton
Western
A Christmas Carol
All Quiet on the Western Front
The Music Man
The Challenge
The Three Musketeers
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Up" . ?e <cast_member> ?e_1 . ?e_1 <pred:name> "Jon Voight" . } UNION { ?e <pred:name> "Western" . ?e <duration> ?pv_1 . ?pv_1 <pred:unit> "minute" . ?pv_1 <pred:value> "120"^^xsd:double . } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Program:
function: Find
inputs: Jon Voight
function: Relate
dependencies: 0
inputs: cast member
backward
function: Find
inputs: Up
function: And
dependencies: 1
2
function: Find
inputs: Western
function: FilterNum
dependencies: 4
inputs: duration
120 minute
=
function: SelectBetween
dependencies: 3
5
inputs: duration
greater
Answer: Up