Question: Who has fewer children, Tom Cruise or Joe Walsh, who works in Washington, D.C.?
Choices:
David Byrne
Sylvester Stallone
William Henry Harrison
Richard Gere
Paul Simon
Rahul Dev Burman
Tom Cruise
Max Fleischer
Joe Walsh
Simon Cowell
Program:
function: Find
inputs: Tom Cruise
function: Find
inputs: Washington, D.C.
function: Relate
dependencies: 1
inputs: work location
backward
function: Find
inputs: Joe Walsh
function: And
dependencies: 2
3
function: SelectBetween
dependencies: 0
4
inputs: number of children
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Tom Cruise" .  } UNION { ?e <pred:name> "Joe Walsh" . ?e <work_location> ?e_1 . ?e_1 <pred:name> "Washington, D.C." .   } ?e <number_of_children> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Tom Cruise