Question: Which show has fewer seasons, Buffy the Vampire Slayer (the one that has Amber Benson as a cast member) or 24 (the one whose genre is action film)?
Choices:
George Washington
Buffy the Vampire Slayer
The Civil War
The Diary of Anne Frank
Battlestar Galactica
24
The Stand
The Ten Commandments
Roots
The Pacific
Program:
function: Find
inputs: Amber Benson
function: Relate
dependencies: 0
inputs: cast member
backward
function: Find
inputs: Buffy the Vampire Slayer
function: And
dependencies: 1
2
function: Find
inputs: action film
function: Relate
dependencies: 4
inputs: genre
backward
function: Find
inputs: 24
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: number of seasons
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Buffy the Vampire Slayer" . ?e <cast_member> ?e_1 . ?e_1 <pred:name> "Amber Benson" .   } UNION { ?e <pred:name> "24" . ?e <genre> ?e_2 . ?e_2 <pred:name> "action film" .  } ?e <number_of_seasons> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: 24