Question: How many plays derive Romeo and Juliet (that originates in Mexico)?
Choices:
0
1
2
3
4
5
6
7
8
9
Answer: 1
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "play" . ?e <derivative_work> ?e_1 . ?e_1 <pred:name> "Romeo and Juliet" . ?e_1 <country_of_origin> ?e_2 . ?e_2 <pred:name> "Mexico" .   }
Program:
function: Find
inputs: Mexico
function: Relate
dependencies: 0
inputs: country of origin
backward
function: Find
inputs: Romeo and Juliet
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: derivative work
backward
function: FilterConcept
dependencies: 4
inputs: play
function: Count
dependencies: 5