Question: Who has fewer children Thomas Mitchell (the one who has 12 children) or Adam Smith (the one that has the occupation of lawyer)?
Choices: Sylvester Stallone
Max Fleischer
Paul Simon
Adam Smith
Richard Gere
William Henry Harrison
James E. Reilly
Rahul Dev Burman
Thomas Mitchell
Simon Cowell
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Thomas Mitchell" . ?e <number_of_children> ?pv_1 . ?pv_1 <pred:unit> "1" . ?pv_1 <pred:value> "12"^^xsd:double . } UNION { ?e <pred:name> "Adam Smith" . ?e <occupation> ?e_1 . ?e_1 <pred:name> "lawyer" . } ?e <number_of_children> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Program:
function: Find
inputs: Thomas Mitchell
function: FilterNum
dependencies: 0
inputs: number of children
12
=
function: Find
inputs: lawyer
function: Relate
dependencies: 2
inputs: occupation
backward
function: Find
inputs: Adam Smith
function: And
dependencies: 3
4
function: SelectBetween
dependencies: 1
5
inputs: number of children
less
Answer: Adam Smith