Question: Which movie is shorter, Bedtime Stories (the one whose producer is Madonna) or Led Zeppelin (the one whose duration is 2690 second)?
Choices:
Bedtime Stories
Peter Gabriel
Led Zeppelin
Metallica
David Bowie
Shakira
Illinois
Neil Young
Friends
The Beatles
Program:
function: Find
inputs: Madonna
function: Relate
dependencies: 0
inputs: producer
backward
function: Find
inputs: Bedtime Stories
function: And
dependencies: 1
2
function: Find
inputs: Led Zeppelin
function: FilterNum
dependencies: 4
inputs: duration
2690 second
=
function: SelectBetween
dependencies: 3
5
inputs: duration
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Bedtime Stories" . ?e <producer> ?e_1 . ?e_1 <pred:name> "Madonna" . } UNION { ?e <pred:name> "Led Zeppelin" . ?e <duration> ?pv_1 . ?pv_1 <pred:unit> "second" . ?pv_1 <pred:value> "2690"^^xsd:double . } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Led Zeppelin