Question: Which has greater area, Gloucester County or Middlesex County (which is located in New Jersey)?
Choices:
Hudson County
Middlesex County
Morris County
Bergen County
Monmouth County
Burlington County
Hunterdon County
Gloucester County
Essex County
Cumberland County
Program:
function: Find
inputs: Gloucester County
function: Find
inputs: New Jersey
function: Relate
dependencies: 1
inputs: located in the administrative territorial entity
backward
function: Find
inputs: Middlesex County
function: And
dependencies: 2
3
function: SelectBetween
dependencies: 0
4
inputs: area
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Gloucester County" .  } UNION { ?e <pred:name> "Middlesex County" . ?e <located_in_the_administrative_territorial_entity> ?e_1 . ?e_1 <pred:name> "New Jersey" .   } ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Gloucester County