Question: How many Alabama counties contain Concord (whose Dewey Decimal Classification is 2--79463) or Birmingham (whose population is 212237)?
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> "county of Alabama" .  { ?e_1 <located_in_the_administrative_territorial_entity> ?e . ?e_1 <pred:name> "Concord" . ?e_1 <Dewey_Decimal_Classification> ?pv . ?pv <pred:value> "2--79463" .  } UNION { ?e_1 <located_in_the_administrative_territorial_entity> ?e . ?e_1 <pred:name> "Birmingham" . ?e_1 <population> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> "212237"^^xsd:double .  } }
Program:
function: Find
inputs: Concord
function: FilterStr
dependencies: 0
inputs: Dewey Decimal Classification
2--79463
function: Relate
dependencies: 1
inputs: located in the administrative territorial entity
forward
function: FilterConcept
dependencies: 2
inputs: county of Alabama
function: Find
inputs: Birmingham
function: FilterNum
dependencies: 4
inputs: population
212237
=
function: Relate
dependencies: 5
inputs: located in the administrative territorial entity
forward
function: FilterConcept
dependencies: 6
inputs: county of Alabama
function: Or
dependencies: 3
7
function: Count
dependencies: 8