Question: Who has more children, Ewan McGregor or Jon Favreau (the one whose Twitter username is Jon_Favreau)?
Choices:
Paul Simon
James E. Reilly
Rahul Dev Burman
Simon Cowell
Richard Gere
Max Fleischer
David Byrne
Ewan McGregor
Sylvester Stallone
William Henry Harrison
Program:
function: Find
inputs: Ewan McGregor
function: Find
inputs: Jon Favreau
function: FilterStr
dependencies: 1
inputs: Twitter username
Jon_Favreau
function: SelectBetween
dependencies: 0
2
inputs: number of children
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Ewan McGregor" . } UNION { ?e <pred:name> "Jon Favreau" . ?e <Twitter_username> ?pv_1 . ?pv_1 <pred:value> "Jon_Favreau" . } ?e <number_of_children> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Ewan McGregor