Question: Who weighs less, Ryan Murphy (the one that has the occupation of athlete) or John Adams (the one that is related to sport ice hockey)?
Choices:
Sylvester Stallone
John Adams
Paul Simon
Max Fleischer
David Byrne
Ryan Murphy
Simon Cowell
Rahul Dev Burman
James E. Reilly
Richard Gere
Program:
function: Find
inputs: athlete
function: Relate
dependencies: 0
inputs: occupation
backward
function: Find
inputs: Ryan Murphy
function: And
dependencies: 1
2
function: Find
inputs: ice hockey
function: Relate
dependencies: 4
inputs: sport
backward
function: Find
inputs: John Adams
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: mass
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Ryan Murphy" . ?e <occupation> ?e_1 . ?e_1 <pred:name> "athlete" .   } UNION { ?e <pred:name> "John Adams" . ?e <sport> ?e_2 . ?e_2 <pred:name> "ice hockey" .  } ?e <mass> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Ryan Murphy