Question: Which movie is longer, The Gay Divorcee or Psycho (the one that has William H. Macy as a cast member)?
Choices:
Psycho
Talk to Her
Training Day
Pleasantville
Curse of the Golden Flower
The Gay Divorcee
The Hunchback of Notre Dame
The Towering Inferno
A Prairie Home Companion
The Fifth Element
Program:
function: Find
inputs: The Gay Divorcee
function: Find
inputs: William H. Macy
function: Relate
dependencies: 1
inputs: cast member
backward
function: Find
inputs: Psycho
function: And
dependencies: 2
3
function: SelectBetween
dependencies: 0
4
inputs: duration
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "The Gay Divorcee" .  } UNION { ?e <pred:name> "Psycho" . ?e <cast_member> ?e_1 . ?e_1 <pred:name> "William H. Macy" .   } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: The Gay Divorcee