Question: How many Virginia counties are located in Virginia (that contains the Lynchburg administrative division) or are the headquarters location of PBS?
Choices: 11
12
13
14
15
16
17
18
19
20
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "county of Virginia" .  { ?e <located_in_the_administrative_territorial_entity> ?e_1 . ?e_1 <pred:name> "Virginia" . ?e_1 <contains_administrative_territorial_entity> ?e_2 . ?e_2 <pred:name> "Lynchburg" .  } UNION { ?e_1 <headquarters_location> ?e . ?e_1 <pred:name> "PBS" .  } }
Program:
function: Find
inputs: Lynchburg
function: Relate
dependencies: 0
inputs: contains administrative territorial entity
backward
function: Find
inputs: Virginia
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: located in the administrative territorial entity
backward
function: FilterConcept
dependencies: 4
inputs: county of Virginia
function: Find
inputs: PBS
function: Relate
dependencies: 6
inputs: headquarters location
forward
function: FilterConcept
dependencies: 7
inputs: county of Virginia
function: Or
dependencies: 5
8
function: Count
dependencies: 9
Answer: 15