Question: How many New Jersey counties have the capital city within this state that is the capital of Middlesex County, located in New Jersey?
Choices: 0
1
2
3
4
5
6
7
8
9
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "county of New Jersey" . ?e_1 <capital_of> ?e . ?e_1 <pred:instance_of> ?c_1 . ?c_1 <pred:name> "city in New Jersey" . ?e_2 <capital> ?e_1 . ?e_2 <pred:name> "Middlesex County" . ?e_2 <located_in_the_administrative_territorial_entity> ?e_3 . ?e_3 <pred:name> "New Jersey" .   }
Program:
function: Find
inputs: New Jersey
function: Relate
dependencies: 0
inputs: located in the administrative territorial entity
backward
function: Find
inputs: Middlesex County
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: capital
forward
function: FilterConcept
dependencies: 4
inputs: city in New Jersey
function: Relate
dependencies: 5
inputs: capital of
forward
function: FilterConcept
dependencies: 6
inputs: county of New Jersey
function: Count
dependencies: 7
Answer: 1