Question: Does Will Smith, the one famous for pop music, or Ice Cube have a greater net worth?
Choices:
David Byrne
Paul Simon
Max Fleischer
Simon Cowell
Will Smith
Sylvester Stallone
James E. Reilly
Rahul Dev Burman
William Henry Harrison
Ice Cube
Program:
function: Find
inputs: pop music
function: Relate
dependencies: 0
inputs: famous people
forward
function: Find
inputs: Will Smith
function: And
dependencies: 1
2
function: Find
inputs: Ice Cube
function: SelectBetween
dependencies: 3
4
inputs: net worth
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Will Smith" . ?e_1 <famous_people> ?e . ?e_1 <pred:name> "pop music" .   } UNION { ?e <pred:name> "Ice Cube" .  } ?e <net_worth> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Will Smith