Question: Who has more children, Sam Mendes or Patrick Doyle (the one that has the occupation of composer)?
Choices:
David Byrne
Richard Gere
Simon Cowell
Rahul Dev Burman
William Henry Harrison
Max Fleischer
Patrick Doyle
Sylvester Stallone
Sam Mendes
Paul Simon
Program:
function: Find
inputs: Sam Mendes
function: Find
inputs: composer
function: Relate
dependencies: 1
inputs: occupation
backward
function: Find
inputs: Patrick Doyle
function: And
dependencies: 2
3
function: SelectBetween
dependencies: 0
4
inputs: number of children
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Sam Mendes" .  } UNION { ?e <pred:name> "Patrick Doyle" . ?e <occupation> ?e_1 . ?e_1 <pred:name> "composer" .   } ?e <number_of_children> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Patrick Doyle