Question: How many counties in New Jersey have an official website at http://www.co.cumberland.nj.us/content/159/3747 or share a border with Cumberland County, which borders Gloucester County?
Choices:
0
1
2
3
4
5
6
7
8
9
Answer: 4
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "county of New Jersey" .  { ?e <official_website> ?pv . ?pv <pred:value> "http://www.co.cumberland.nj.us/content/159/3747.aspx" .  } UNION { ?e_1 <shares_border_with> ?e . ?e_1 <pred:name> "Cumberland County" . ?e_1 <shares_border_with> ?e_2 . ?e_2 <pred:name> "Gloucester County" .  } }
Program:
function: FindAll
function: FilterStr
dependencies: 0
inputs: official website
http://www.co.cumberland.nj.us/content/159/3747.aspx
function: FilterConcept
dependencies: 1
inputs: county of New Jersey
function: Find
inputs: Gloucester County
function: Relate
dependencies: 3
inputs: shares border with
backward
function: Find
inputs: Cumberland County
function: And
dependencies: 4
5
function: Relate
dependencies: 6
inputs: shares border with
forward
function: FilterConcept
dependencies: 7
inputs: county of New Jersey
function: Or
dependencies: 2
8
function: Count
dependencies: 9