Question: Which one has a longer duration, April (the one whose color is black-and-white) or Shane?
Choices:
The Hunchback of Notre Dame
Talk to Her
Rebecca
April
Curse of the Golden Flower
A Prairie Home Companion
Pleasantville
Shane
The Fifth Element
Training Day
Program:
function: Find
inputs: black-and-white
function: Relate
dependencies: 0
inputs: color
backward
function: Find
inputs: April
function: And
dependencies: 1
2
function: Find
inputs: Shane
function: SelectBetween
dependencies: 3
4
inputs: duration
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "April" . ?e <color> ?e_1 . ?e_1 <pred:name> "black-and-white" .   } UNION { ?e <pred:name> "Shane" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Shane