Question: For the genre of the television series based on Battlestar Galactica (the one that has Fred Astaire as a cast member), how many are science fictions?
Choices: 0
1
2
3
4
5
6
7
8
9
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "science fiction" . ?e_1 <genre> ?e . ?e_1 <pred:instance_of> ?c_1 . ?c_1 <pred:name> "television series" . ?e_1 <based_on> ?e_2 . ?e_2 <pred:name> "Battlestar Galactica" . ?e_2 <cast_member> ?e_3 . ?e_3 <pred:name> "Fred Astaire" .   }
Program:
function: Find
inputs: Fred Astaire
function: Relate
dependencies: 0
inputs: cast member
backward
function: Find
inputs: Battlestar Galactica
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: based on
backward
function: FilterConcept
dependencies: 4
inputs: television series
function: Relate
dependencies: 5
inputs: genre
forward
function: FilterConcept
dependencies: 6
inputs: science fiction
function: Count
dependencies: 7
Answer: 1