Question: How many mountain ranges, located in American continent, or connecting with the Iberian Peninsula, do we know ?
Choices:
0
1
2
3
4
5
6
7
8
9
Answer: 2
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "mountain range" .  { ?e <continent> ?e_1 . ?e_1 <pred:name> "Americas" .  } UNION { ?e <connects_with> ?e_1 . ?e_1 <pred:name> "Iberian Peninsula" .  } }
Program:
function: Find
inputs: Americas
function: Relate
dependencies: 0
inputs: continent
backward
function: FilterConcept
dependencies: 1
inputs: mountain range
function: Find
inputs: Iberian Peninsula
function: Relate
dependencies: 3
inputs: connects with
backward
function: FilterConcept
dependencies: 4
inputs: mountain range
function: Or
dependencies: 2
5
function: Count
dependencies: 6