Question: How many United States towns are an administrative division of the New Jersey county whose capital is Morristown?
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> "town of the United States" . ?e_1 <contains_administrative_territorial_entity> ?e . ?e_1 <pred:instance_of> ?c_1 . ?c_1 <pred:name> "county of New Jersey" . ?e_2 <capital_of> ?e_1 . ?e_2 <pred:name> "Morristown" .   }
Program:
function: Find
inputs: Morristown
function: Relate
dependencies: 0
inputs: capital of
forward
function: FilterConcept
dependencies: 1
inputs: county of New Jersey
function: Relate
dependencies: 2
inputs: contains administrative territorial entity
forward
function: FilterConcept
dependencies: 3
inputs: town of the United States
function: Count
dependencies: 4