Question: Which is longer, Prince of Persia: The Sands of Time (the one whose publication date is 2010-08-12) or Beauty and the Beast (the one that has Emma Watson as a cast member)?
Choices:
The Flintstones in Viva Rock Vegas
National Treasure: Book of Secrets
Prince of Persia: The Sands of Time
John Carter
The Muppets
Alvin and the Chipmunks: Chipwrecked
G-Force
Holes
Old Dogs
Beauty and the Beast
Program:
function: Find
inputs: Prince of Persia: The Sands of Time
function: FilterDate
dependencies: 0
inputs: publication date
2010-08-12
=
function: Find
inputs: Emma Watson
function: Relate
dependencies: 2
inputs: cast member
backward
function: Find
inputs: Beauty and the Beast
function: And
dependencies: 3
4
function: SelectBetween
dependencies: 1
5
inputs: duration
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Prince of Persia: The Sands of Time" . ?e <publication_date> ?pv_1 . ?pv_1 <pred:date> "2010-08-12"^^xsd:date . } UNION { ?e <pred:name> "Beauty and the Beast" . ?e <cast_member> ?e_1 . ?e_1 <pred:name> "Emma Watson" . } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Beauty and the Beast