Question: Which one, George Miller (the one that has the occupation of lawyer) or Brendan Fraser, has a greater number of children?
Choices:
George Miller
David Byrne
Rahul Dev Burman
Paul Simon
Brendan Fraser
Sylvester Stallone
James E. Reilly
Max Fleischer
Richard Gere
Simon Cowell
Program:
function: Find
inputs: lawyer
function: Relate
dependencies: 0
inputs: occupation
backward
function: Find
inputs: George Miller
function: And
dependencies: 1
2
function: Find
inputs: Brendan Fraser
function: SelectBetween
dependencies: 3
4
inputs: number of children
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "George Miller" . ?e <occupation> ?e_1 . ?e_1 <pred:name> "lawyer" .   } UNION { ?e <pred:name> "Brendan Fraser" .  } ?e <number_of_children> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Brendan Fraser