Question: On what location does Staten Island, with the area of 265 square km, border Brooklyn, the birthplace of Mel Brooks ?
Choices: southeast
consolidated city-county
southwest
south-southwest
west
north
east
northeast
northwest
north-northwest
SPARQL: SELECT DISTINCT ?qpv WHERE { ?e_1 <pred:name> "Staten Island" . ?e_1 <area> ?pv . ?pv <pred:unit> "square kilometre" . ?pv <pred:value> "265"^^xsd:double . ?e_2 <pred:name> "Brooklyn" . ?e_3 <place_of_birth> ?e_2 . ?e_3 <pred:name> "Mel Brooks" . ?e_1 <shares_border_with> ?e_2 . [ <pred:fact_h> ?e_1 ; <pred:fact_r> <shares_border_with> ; <pred:fact_t> ?e_2 ] <direction_relative_to_location> ?qpv .  }
Program:
function: Find
inputs: Staten Island
function: FilterNum
dependencies: 0
inputs: area
265 square kilometre
=
function: Find
inputs: Mel Brooks
function: Relate
dependencies: 2
inputs: place of birth
forward
function: Find
inputs: Brooklyn
function: And
dependencies: 3
4
function: QueryRelationQualifier
dependencies: 1
5
inputs: shares border with
direction relative to location
Answer: northeast