Question: Which movie is shorter, Hope Springs (the one whose distributor is Walt Disney Studios Motion Pictures) or Hamlet (the one whose genre is romance film)?
Choices:
Hope Springs
A Prairie Home Companion
The Towering Inferno
Talk to Her
Training Day
Hamlet
Rebecca
The Fifth Element
Curse of the Golden Flower
Pleasantville
Answer: Hope Springs
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Hope Springs" . ?e <distributor> ?e_1 . ?e_1 <pred:name> "Walt Disney Studios Motion Pictures" .   } UNION { ?e <pred:name> "Hamlet" . ?e <genre> ?e_2 . ?e_2 <pred:name> "romance film" .  } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Program:
function: Find
inputs: Walt Disney Studios Motion Pictures
function: Relate
dependencies: 0
inputs: distributor
backward
function: Find
inputs: Hope Springs
function: And
dependencies: 1
2
function: Find
inputs: romance film
function: Relate
dependencies: 4
inputs: genre
backward
function: Find
inputs: Hamlet
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: duration
less