Question: How many fictional professions are inspired by Catwoman (the one that appears in The Dark Knight Rises) or is a derivative work of Superman (the one that has Adam Baldwin as a performer)?
Choices:
0
1
2
3
4
5
6
7
8
9
Answer: 4
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "fictional profession" .  { ?e <inspired_by> ?e_1 . ?e_1 <pred:name> "Catwoman" . ?e_2 <characters> ?e_1 . ?e_2 <pred:name> "The Dark Knight Rises" .  } UNION { ?e_1 <derivative_work> ?e . ?e_1 <pred:name> "Superman" . ?e_1 <performer> ?e_2 . ?e_2 <pred:name> "Adam Baldwin" .  } }
Program:
function: Find
inputs: The Dark Knight Rises
function: Relate
dependencies: 0
inputs: characters
forward
function: Find
inputs: Catwoman
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: inspired by
backward
function: FilterConcept
dependencies: 4
inputs: fictional profession
function: Find
inputs: Adam Baldwin
function: Relate
dependencies: 6
inputs: performer
backward
function: Find
inputs: Superman
function: And
dependencies: 7
8
function: Relate
dependencies: 9
inputs: derivative work
forward
function: FilterConcept
dependencies: 10
inputs: fictional profession
function: Or
dependencies: 5
11
function: Count
dependencies: 12