Question: Which movie is shorter, Happy Days (the one whose color is black-and-white) or David Copperfield (the one whose duration is 67 minute)?
Choices:
Happy Days
Training Day
A Prairie Home Companion
The Fifth Element
David Copperfield
Talk to Her
Rebecca
The Hunchback of Notre Dame
Curse of the Golden Flower
Pleasantville
Answer: David Copperfield
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Happy Days" . ?e <color> ?e_1 . ?e_1 <pred:name> "black-and-white" . } UNION { ?e <pred:name> "David Copperfield" . ?e <duration> ?pv_1 . ?pv_1 <pred:unit> "minute" . ?pv_1 <pred:value> "67"^^xsd:double . } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Program:
function: Find
inputs: black-and-white
function: Relate
dependencies: 0
inputs: color
backward
function: Find
inputs: Happy Days
function: And
dependencies: 1
2
function: Find
inputs: David Copperfield
function: FilterNum
dependencies: 4
inputs: duration
67 minute
=
function: SelectBetween
dependencies: 3
5
inputs: duration
less