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