Question: How many superheroes are at home on Earth (the one whose population is 3,021,475,000) or partner Batham (the one that forms the basis for Batman: Gotham Knight) ?
Choices:
0
1
2
3
4
5
6
7
8
9
Answer: 3
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "superhero" .  { ?e <home_world> ?e_1 . ?e_1 <pred:name> "Earth" . ?e_1 <population> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> "3021475000"^^xsd:double .  } UNION { ?e <partner> ?e_1 . ?e_1 <pred:name> "Batman" . ?e_1 <derivative_work> ?e_2 . ?e_2 <pred:name> "Batman: Gotham Knight" .  } }
Program:
function: Find
inputs: Earth
function: FilterNum
dependencies: 0
inputs: population
3021475000
=
function: Relate
dependencies: 1
inputs: home world
backward
function: FilterConcept
dependencies: 2
inputs: superhero
function: Find
inputs: Batman: Gotham Knight
function: Relate
dependencies: 4
inputs: derivative work
backward
function: Find
inputs: Batman
function: And
dependencies: 5
6
function: Relate
dependencies: 7
inputs: partner
backward
function: FilterConcept
dependencies: 8
inputs: superhero
function: Or
dependencies: 3
9
function: Count
dependencies: 10