Question: Among the cities in New Jersey that is located in Middlesex County (the one that is an administrative division of New Jersey), which one has the largest area ?
Choices:
Passaic
Trenton
Perth Amboy
Plainfield
Atlantic City
New Brunswick
Jersey City
Elizabeth
East Orange
Hoboken
Program:
function: Find
inputs: New Jersey
function: Relate
dependencies: 0
inputs: contains administrative territorial entity
forward
function: Find
inputs: Middlesex County
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: located in the administrative territorial entity
backward
function: FilterConcept
dependencies: 4
inputs: city in New Jersey
function: SelectAmong
dependencies: 5
inputs: area
largest
SPARQL: SELECT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "city in New Jersey" . ?e <located_in_the_administrative_territorial_entity> ?e_1 . ?e_1 <pred:name> "Middlesex County" . ?e_2 <contains_administrative_territorial_entity> ?e_1 . ?e_2 <pred:name> "New Jersey" .  ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Perth Amboy