Question: Which has a greater duration, Guys and Dolls (which has Sheldon Leonard as a cast member) or Marie Antoinette (whose color is black-and-white)?
Choices:
Pleasantville
Guys and Dolls
The Hunchback of Notre Dame
Talk to Her
A Prairie Home Companion
Rebecca
Marie Antoinette
The Fifth Element
The Towering Inferno
Training Day
Program:
function: Find
inputs: Sheldon Leonard
function: Relate
dependencies: 0
inputs: cast member
backward
function: Find
inputs: Guys and Dolls
function: And
dependencies: 1
2
function: Find
inputs: black-and-white
function: Relate
dependencies: 4
inputs: color
backward
function: Find
inputs: Marie Antoinette
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: duration
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Guys and Dolls" . ?e <cast_member> ?e_1 . ?e_1 <pred:name> "Sheldon Leonard" .   } UNION { ?e <pred:name> "Marie Antoinette" . ?e <color> ?e_2 . ?e_2 <pred:name> "black-and-white" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Marie Antoinette