Question: How many currencies are either used by San Marino, the enclave of Italy, or in France?
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> "currency" .  { ?e_1 <currency> ?e . ?e_1 <pred:name> "San Marino" . ?e_1 <enclave_within> ?e_2 . ?e_2 <pred:name> "Italy" .  } UNION { ?e_1 <currency> ?e . ?e_1 <pred:name> "France" .  } }
Program:
function: Find
inputs: Italy
function: Relate
dependencies: 0
inputs: enclave within
backward
function: Find
inputs: San Marino
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: currency
forward
function: FilterConcept
dependencies: 4
inputs: currency
function: Find
inputs: France
function: Relate
dependencies: 6
inputs: currency
forward
function: FilterConcept
dependencies: 7
inputs: currency
function: Or
dependencies: 5
8
function: Count
dependencies: 9