Question: Which has a greater number of seasons, Sherlock Holmes (whose genre is detective fiction) or The X-Files (which has Howard Gordon as an executive producer)?
Choices:
Six Feet Under
Sherlock Holmes
The X-Files
Game of Thrones
Seinfeld
American Horror Story
Bleak House
Phineas and Ferb
Robot Chicken
Dancing with the Stars
Program:
function: Find
inputs: detective fiction
function: Relate
dependencies: 0
inputs: genre
backward
function: Find
inputs: Sherlock Holmes
function: And
dependencies: 1
2
function: Find
inputs: Howard Gordon
function: Relate
dependencies: 4
inputs: executive producer
backward
function: Find
inputs: The X-Files
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: number of seasons
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Sherlock Holmes" . ?e <genre> ?e_1 . ?e_1 <pred:name> "detective fiction" .   } UNION { ?e <pred:name> "The X-Files" . ?e <executive_producer> ?e_2 . ?e_2 <pred:name> "Howard Gordon" .  } ?e <number_of_seasons> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: The X-Files