Question: Which has the highest elevation above sea level in cities in New Jersey sharing a border with Manhattan (the one that is the birthplace of Peter Gallagher)?
Choices:
Plainfield
Paterson
Bayonne
Atlantic City
Perth Amboy
East Orange
Trenton
Passaic
Jersey City
Elizabeth
Program:
function: Find
inputs: Peter Gallagher
function: Relate
dependencies: 0
inputs: place of birth
forward
function: Find
inputs: Manhattan
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: shares border with
backward
function: FilterConcept
dependencies: 4
inputs: city in New Jersey
function: SelectAmong
dependencies: 5
inputs: elevation above sea level
largest
SPARQL: SELECT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "city in New Jersey" . ?e <shares_border_with> ?e_1 . ?e_1 <pred:name> "Manhattan" . ?e_2 <place_of_birth> ?e_1 . ?e_2 <pred:name> "Peter Gallagher" .  ?e <elevation_above_sea_level> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Jersey City