Question: How many saxophones include famous people Tom Scott (who was born in Los Angeles) or are the instrument used by John Coltrane?
Choices:
1
2
3
4
5
6
7
8
9
10
Answer: 4
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "saxophone" .  { ?e <famous_people> ?e_1 . ?e_1 <pred:name> "Tom Scott" . ?e_1 <place_of_birth> ?e_2 . ?e_2 <pred:name> "Los Angeles" .  } UNION { ?e_1 <instrument> ?e . ?e_1 <pred:name> "John Coltrane" .  } }
Program:
function: Find
inputs: Los Angeles
function: Relate
dependencies: 0
inputs: place of birth
backward
function: Find
inputs: Tom Scott
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: famous people
backward
function: FilterConcept
dependencies: 4
inputs: saxophone
function: Find
inputs: John Coltrane
function: Relate
dependencies: 6
inputs: instrument
forward
function: FilterConcept
dependencies: 7
inputs: saxophone
function: Or
dependencies: 5
8
function: Count
dependencies: 9