Question: Who has fewer children, Mamoru Miyano or James Caan (the one that has the religion Islam)?
Choices:
Rahul Dev Burman
William Henry Harrison
James Caan
David Byrne
Mamoru Miyano
Richard Gere
Simon Cowell
Sylvester Stallone
Max Fleischer
James E. Reilly
Program:
function: Find
inputs: Mamoru Miyano
function: Find
inputs: Islam
function: Relate
dependencies: 1
inputs: religion
backward
function: Find
inputs: James Caan
function: And
dependencies: 2
3
function: SelectBetween
dependencies: 0
4
inputs: number of children
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Mamoru Miyano" .  } UNION { ?e <pred:name> "James Caan" . ?e <religion> ?e_1 . ?e_1 <pred:name> "Islam" .   } ?e <number_of_children> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Mamoru Miyano