Question: Does Amitabh Bachchan or Stephen King (who is the screenwriter of The Shawshank Redemption) have the lower net worth?
Choices:
David Byrne
Stephen King
James E. Reilly
Rahul Dev Burman
Amitabh Bachchan
William Henry Harrison
Richard Gere
Sylvester Stallone
Simon Cowell
Paul Simon
Program:
function: Find
inputs: Amitabh Bachchan
function: Find
inputs: The Shawshank Redemption
function: Relate
dependencies: 1
inputs: screenwriter
forward
function: Find
inputs: Stephen King
function: And
dependencies: 2
3
function: SelectBetween
dependencies: 0
4
inputs: net worth
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Amitabh Bachchan" .  } UNION { ?e <pred:name> "Stephen King" . ?e_1 <screenwriter> ?e . ?e_1 <pred:name> "The Shawshank Redemption" .   } ?e <net_worth> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Stephen King