Question: How many Virginia counties are of the country United States of America or are an administrative division of Virginia (whose FIPS 5-2 alpha code (US states) is VA)?
Choices: 12
13
14
15
16
17
18
19
20
21
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "county of Virginia" .  { ?e <country> ?e_1 . ?e_1 <pred:name> "United States of America" .  } UNION { ?e_1 <contains_administrative_territorial_entity> ?e . ?e_1 <pred:name> "Virginia" . ?e_1 <FIPS_5-2_alpha_code_(US_states)> ?pv . ?pv <pred:value> "VA" .  } }
Program:
function: Find
inputs: United States of America
function: Relate
dependencies: 0
inputs: country
backward
function: FilterConcept
dependencies: 1
inputs: county of Virginia
function: Find
inputs: Virginia
function: FilterStr
dependencies: 3
inputs: FIPS 5-2 alpha code (US states)
VA
function: Relate
dependencies: 4
inputs: contains administrative territorial entity
forward
function: FilterConcept
dependencies: 5
inputs: county of Virginia
function: Or
dependencies: 2
6
function: Count
dependencies: 7
Answer: 15