Question: Who has fewer children, Bryan Adams (the one whose genre is pop rock) or Barbara Walters?
Choices:
Paul Simon
Sylvester Stallone
Bryan Adams
James E. Reilly
Richard Gere
Rahul Dev Burman
Barbara Walters
David Byrne
Simon Cowell
Max Fleischer
Program:
function: Find
inputs: pop rock
function: Relate
dependencies: 0
inputs: genre
backward
function: Find
inputs: Bryan Adams
function: And
dependencies: 1
2
function: Find
inputs: Barbara Walters
function: SelectBetween
dependencies: 3
4
inputs: number of children
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Bryan Adams" . ?e <genre> ?e_1 . ?e_1 <pred:name> "pop rock" .   } UNION { ?e <pred:name> "Barbara Walters" .  } ?e <number_of_children> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Barbara Walters