Question: How many counties of NY, headquartered in Ithaca (capital of Tompkins County) or with the population of over 890,000, do we know ?
Choices: 3
4
5
6
7
8
9
10
11
12
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "county of New York" .  { ?e <headquarters_location> ?e_1 . ?e_1 <pred:name> "Ithaca" . ?e_2 <capital> ?e_1 . ?e_2 <pred:name> "Tompkins County" .  } UNION { ?e <population> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> ?v . FILTER ( ?v > "890000"^^xsd:double ) .  } }
Program:
function: Find
inputs: Tompkins County
function: Relate
dependencies: 0
inputs: capital
forward
function: Find
inputs: Ithaca
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: headquarters location
backward
function: FilterConcept
dependencies: 4
inputs: county of New York
function: FindAll
function: FilterNum
dependencies: 6
inputs: population
890000
>
function: FilterConcept
dependencies: 7
inputs: county of New York
function: Or
dependencies: 5
8
function: Count
dependencies: 9
Answer: 4