Question: Which show has more seasons, I Spy (the one whose number of seasons is 3) or Happy Days (the one that has Robin Williams as a cast member)?
Choices:
Happy Days
Robot Chicken
American Horror Story
Game of Thrones
Bleak House
Seinfeld
Phineas and Ferb
Saturday Night's Main Event
I Spy
Six Feet Under
Answer: Happy Days
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "I Spy" . ?e <number_of_seasons> ?pv_1 . ?pv_1 <pred:unit> "1" . ?pv_1 <pred:value> "3"^^xsd:double . } UNION { ?e <pred:name> "Happy Days" . ?e <cast_member> ?e_1 . ?e_1 <pred:name> "Robin Williams" . } ?e <number_of_seasons> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Program:
function: Find
inputs: I Spy
function: FilterNum
dependencies: 0
inputs: number of seasons
3
=
function: Find
inputs: Robin Williams
function: Relate
dependencies: 2
inputs: cast member
backward
function: Find
inputs: Happy Days
function: And
dependencies: 3
4
function: SelectBetween
dependencies: 1
5
inputs: number of seasons
greater