Question: Which one, Middlesex County (the one that shares border with Monmouth County) or Essex County (the one whose population is 786337), has greater area?
Choices:
Morris County
Essex County
Hudson County
Cumberland County
Hunterdon County
Burlington County
Middlesex County
Passaic County
Monmouth County
Bergen County
Program:
function: Find
inputs: Monmouth County
function: Relate
dependencies: 0
inputs: shares border with
forward
function: Find
inputs: Middlesex County
function: And
dependencies: 1
2
function: Find
inputs: Essex County
function: FilterNum
dependencies: 4
inputs: population
786337
=
function: SelectBetween
dependencies: 3
5
inputs: area
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Middlesex County" . ?e_1 <shares_border_with> ?e . ?e_1 <pred:name> "Monmouth County" . } UNION { ?e <pred:name> "Essex County" . ?e <population> ?pv_1 . ?pv_1 <pred:unit> "1" . ?pv_1 <pred:value> "786337"^^xsd:double . } ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Middlesex County