Question: How many animated feature films take place in the same location as Shrek (distributed by Dreamworks)?
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 feature film" . ?e <takes_place_in_fictional_universe> ?e_1 . ?e_1 <pred:name> "Shrek" . ?e_1 <distributor> ?e_2 . ?e_2 <pred:name> "DreamWorks" .   }
Program:
function: Find
inputs: DreamWorks
function: Relate
dependencies: 0
inputs: distributor
backward
function: Find
inputs: Shrek
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: takes place in fictional universe
backward
function: FilterConcept
dependencies: 4
inputs: animated feature film
function: Count
dependencies: 5
Answer: 5