Question: How many animated characters are based on Tarzan (that is created by Edgar Rice Burroughs) or are the spouse of Ghost Rider (whose occupation is accountant)?
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> "animated character" .  { ?e <based_on> ?e_1 . ?e_1 <pred:name> "Tarzan" . ?e_1 <creator> ?e_2 . ?e_2 <pred:name> "Edgar Rice Burroughs" .  } UNION { ?e_1 <spouse> ?e . ?e_1 <pred:name> "Ghost Rider" . ?e_1 <occupation> ?e_2 . ?e_2 <pred:name> "accountant" .  } }
Program:
function: Find
inputs: Edgar Rice Burroughs
function: Relate
dependencies: 0
inputs: creator
backward
function: Find
inputs: Tarzan
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: based on
backward
function: FilterConcept
dependencies: 4
inputs: animated character
function: Find
inputs: accountant
function: Relate
dependencies: 6
inputs: occupation
backward
function: Find
inputs: Ghost Rider
function: And
dependencies: 7
8
function: Relate
dependencies: 9
inputs: spouse
forward
function: FilterConcept
dependencies: 10
inputs: animated character
function: Or
dependencies: 5
11
function: Count
dependencies: 12
Answer: 1