Question: Does Gwyneth Paltrow or the James Madison who died from heart failure have more offspring?
Choices:
Paul Simon
Richard Gere
David Byrne
James Madison
Simon Cowell
Rahul Dev Burman
James E. Reilly
Max Fleischer
Sylvester Stallone
Gwyneth Paltrow
Program:
function: Find
inputs: Gwyneth Paltrow
function: Find
inputs: heart failure
function: Relate
dependencies: 1
inputs: cause of death
backward
function: Find
inputs: James Madison
function: And
dependencies: 2
3
function: SelectBetween
dependencies: 0
4
inputs: number of children
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Gwyneth Paltrow" .  } UNION { ?e <pred:name> "James Madison" . ?e <cause_of_death> ?e_1 . ?e_1 <pred:name> "heart failure" .   } ?e <number_of_children> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Gwyneth Paltrow