Question: Which movie is shorter, Sense and Sensibility (the one whose distributor is BBC) or Merlin (the one whose end time is 2012-12-24)?
Choices: Game of Thrones
Merlin
Robot Chicken
Dancing with the Stars
Sense and Sensibility
Bleak House
Saturday Night's Main Event
Six Feet Under
Seinfeld
American Horror Story
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Sense and Sensibility" . ?e <distributor> ?e_1 . ?e_1 <pred:name> "BBC" . } UNION { ?e <pred:name> "Merlin" . ?e <end_time> ?pv_1 . ?pv_1 <pred:date> "2012-12-24"^^xsd:date . } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Program:
function: Find
inputs: BBC
function: Relate
dependencies: 0
inputs: distributor
backward
function: Find
inputs: Sense and Sensibility
function: And
dependencies: 1
2
function: Find
inputs: Merlin
function: FilterDate
dependencies: 4
inputs: end time
2012-12-24
=
function: SelectBetween
dependencies: 3
5
inputs: duration
less
Answer: Merlin