Question: Tell me the one that has more kids, Simon Cowell or James Buchanan (the person that has CANTIC-ID is a1187837x)
Choices:
Sylvester Stallone
Simon Cowell
James E. Reilly
Richard Gere
Babyface
Rahul Dev Burman
Paul Simon
William Henry Harrison
James Buchanan
Max Fleischer
Program:
function: Find
inputs: Simon Cowell
function: Find
inputs: James Buchanan
function: FilterStr
dependencies: 1
inputs: CANTIC-ID
a1187837x
function: SelectBetween
dependencies: 0
2
inputs: number of children
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Simon Cowell" . } UNION { ?e <pred:name> "James Buchanan" . ?e <CANTIC-ID> ?pv_1 . ?pv_1 <pred:value> "a1187837x" . } ?e <number_of_children> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: James Buchanan