Question: Which has a greater mass, Kevin McHale (who is related to the sport basketball) or Tom Johnson (who is related to the sport American football)?
Choices:
Sylvester Stallone
Kevin McHale
Max Fleischer
Simon Cowell
William Henry Harrison
Richard Gere
Paul Simon
David Byrne
Tom Johnson
Rahul Dev Burman
Program:
function: Find
inputs: basketball
function: Relate
dependencies: 0
inputs: sport
backward
function: Find
inputs: Kevin McHale
function: And
dependencies: 1
2
function: Find
inputs: American football
function: Relate
dependencies: 4
inputs: sport
backward
function: Find
inputs: Tom Johnson
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: mass
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Kevin McHale" . ?e <sport> ?e_1 . ?e_1 <pred:name> "basketball" .   } UNION { ?e <pred:name> "Tom Johnson" . ?e <sport> ?e_2 . ?e_2 <pred:name> "American football" .  } ?e <mass> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Tom Johnson