Question: Who has more children, Ulysses S. Grant or Thomas Jefferson (the one that died in the manner of natural causes)?
Choices:
Sylvester Stallone
Max Fleischer
Ulysses S. Grant
Rahul Dev Burman
Thomas Jefferson
David Byrne
Paul Simon
James E. Reilly
Simon Cowell
Richard Gere
Answer: Thomas Jefferson
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Ulysses S. Grant" .  } UNION { ?e <pred:name> "Thomas Jefferson" . ?e <manner_of_death> ?e_1 . ?e_1 <pred:name> "natural causes" .   } ?e <number_of_children> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Program:
function: Find
inputs: Ulysses S. Grant
function: Find
inputs: natural causes
function: Relate
dependencies: 1
inputs: manner of death
backward
function: Find
inputs: Thomas Jefferson
function: And
dependencies: 2
3
function: SelectBetween
dependencies: 0
4
inputs: number of children
greater