Question: How many counties in Pennsylvania were either founded before 1795 or have a population greater than 8000?
Choices:
35
36
37
38
39
40
41
42
43
44
Answer: 38
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "county of Pennsylvania" .  { ?e <inception> ?pv . ?pv <pred:year> ?v . FILTER ( ?v < 1795 ) .  } UNION { ?e <population> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> ?v . FILTER ( ?v > "8000"^^xsd:double ) .  } }
Program:
function: FindAll
function: FilterYear
dependencies: 0
inputs: inception
1795
<
function: FilterConcept
dependencies: 1
inputs: county of Pennsylvania
function: FindAll
function: FilterNum
dependencies: 3
inputs: population
8000
>
function: FilterConcept
dependencies: 4
inputs: county of Pennsylvania
function: Or
dependencies: 2
5
function: Count
dependencies: 6