Question: Which show has more episodes, Somerset (the one that origins from United States of America) or I Spy (the one whose distributor is Republic Pictures)?
Choices:
Phineas and Ferb
I Spy
Seinfeld
Dancing with the Stars
Bleak House
Six Feet Under
American Horror Story
Somerset
Game of Thrones
Saturday Night's Main Event
Answer: Somerset
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Somerset" . ?e <country_of_origin> ?e_1 . ?e_1 <pred:name> "United States of America" .   } UNION { ?e <pred:name> "I Spy" . ?e <distributor> ?e_2 . ?e_2 <pred:name> "Republic Pictures" .  } ?e <number_of_episodes> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Program:
function: Find
inputs: United States of America
function: Relate
dependencies: 0
inputs: country of origin
backward
function: Find
inputs: Somerset
function: And
dependencies: 1
2
function: Find
inputs: Republic Pictures
function: Relate
dependencies: 4
inputs: distributor
backward
function: Find
inputs: I Spy
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: number of episodes
greater