Question: Who is taller: the John Hughes born in Edinburgh, or James Stewart at 185 cm?
Choices: Sylvester Stallone
John Hughes
Paul Simon
William Henry Harrison
Richard Gere
James E. Reilly
Max Fleischer
Simon Cowell
Rahul Dev Burman
James Stewart
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "John Hughes" . ?e <place_of_birth> ?e_1 . ?e_1 <pred:name> "Edinburgh" . } UNION { ?e <pred:name> "James Stewart" . ?e <height> ?pv_1 . ?pv_1 <pred:unit> "centimetre" . ?pv_1 <pred:value> "185"^^xsd:double . } ?e <height> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Program:
function: Find
inputs: Edinburgh
function: Relate
dependencies: 0
inputs: place of birth
backward
function: Find
inputs: John Hughes
function: And
dependencies: 1
2
function: Find
inputs: James Stewart
function: FilterNum
dependencies: 4
inputs: height
185 centimetre
=
function: SelectBetween
dependencies: 3
5
inputs: height
greater
Answer: James Stewart