Question: What is the number of superheroes that are the partner of Wonder Woman (whose occupation is astronaut) and inspire Batman (whose subreddit is batman)?
Choices:
1
2
3
4
5
6
7
8
9
10
Answer: 1
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "superhero" . ?e <partner> ?e_1 . ?e_1 <pred:name> "Wonder Woman" . ?e_1 <occupation> ?e_2 . ?e_2 <pred:name> "astronaut" .  ?e_3 <inspired_by> ?e . ?e_3 <pred:name> "Batman" . ?e_3 <subreddit> ?pv . ?pv <pred:value> "batman" .  }
Program:
function: Find
inputs: astronaut
function: Relate
dependencies: 0
inputs: occupation
backward
function: Find
inputs: Wonder Woman
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: partner
backward
function: FilterConcept
dependencies: 4
inputs: superhero
function: Find
inputs: Batman
function: FilterStr
dependencies: 6
inputs: subreddit
batman
function: Relate
dependencies: 7
inputs: inspired by
forward
function: FilterConcept
dependencies: 8
inputs: superhero
function: And
dependencies: 5
9
function: Count
dependencies: 10