Question: How many New York counties are located in Virginia (the one whose FIPS 5-2 numeric code (US states) is 51) or report 36033 as their FIPS 6-4 (US counties) ?
Choices:
0
1
2
3
4
5
6
7
8
9
Answer: 1
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "county of New York" .  { ?e <located_in_the_administrative_territorial_entity> ?e_1 . ?e_1 <pred:name> "Virginia" . ?e_1 <FIPS_5-2_numeric_code_(US_states)> ?pv . ?pv <pred:value> "51" .  } UNION { ?e <FIPS_6-4_(US_counties)> ?pv . ?pv <pred:value> "36033" .  } }
Program:
function: Find
inputs: Virginia
function: FilterStr
dependencies: 0
inputs: FIPS 5-2 numeric code (US states)
51
function: Relate
dependencies: 1
inputs: located in the administrative territorial entity
backward
function: FilterConcept
dependencies: 2
inputs: county of New York
function: FindAll
function: FilterStr
dependencies: 4
inputs: FIPS 6-4 (US counties)
36033
function: FilterConcept
dependencies: 5
inputs: county of New York
function: Or
dependencies: 3
6
function: Count
dependencies: 7