Question: Regarding James Caan (whose birthplace is Lahore) and Chandra Wilson, which one has more children?
Choices:
James E. Reilly
Simon Cowell
William Henry Harrison
David Byrne
Chandra Wilson
Paul Simon
Richard Gere
Rahul Dev Burman
Sylvester Stallone
James Caan
Program:
function: Find
inputs: Chandra Wilson
function: Find
inputs: Lahore
function: Relate
dependencies: 1
inputs: place of birth
backward
function: Find
inputs: James Caan
function: And
dependencies: 2
3
function: SelectBetween
dependencies: 0
4
inputs: number of children
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Chandra Wilson" .  } UNION { ?e <pred:name> "James Caan" . ?e <place_of_birth> ?e_1 . ?e_1 <pred:name> "Lahore" .   } ?e <number_of_children> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Chandra Wilson