Question: How many Pennsylvania counties contains the administrative division Bethlehem (the one whose population is 74982) or named after Somerset (the one whose FIPS 10-4 (countries and regions) is UKM3)?
Choices:
1
2
3
4
5
6
7
8
9
10
Answer: 1
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "county of Pennsylvania" .  { ?e <contains_administrative_territorial_entity> ?e_1 . ?e_1 <pred:name> "Bethlehem" . ?e_1 <population> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> "74982"^^xsd:double .  } UNION { ?e <named_after> ?e_1 . ?e_1 <pred:name> "Somerset" . ?e_1 <FIPS_10-4_(countries_and_regions)> ?pv . ?pv <pred:value> "UKM3" .  } }
Program:
function: Find
inputs: Bethlehem
function: FilterNum
dependencies: 0
inputs: population
74982
=
function: Relate
dependencies: 1
inputs: contains administrative territorial entity
backward
function: FilterConcept
dependencies: 2
inputs: county of Pennsylvania
function: Find
inputs: Somerset
function: FilterStr
dependencies: 4
inputs: FIPS 10-4 (countries and regions)
UKM3
function: Relate
dependencies: 5
inputs: named after
backward
function: FilterConcept
dependencies: 6
inputs: county of Pennsylvania
function: Or
dependencies: 3
7
function: Count
dependencies: 8