Question: Which area is smaller, Middlesex County (the one that shares border with Monmouth County) or Essex County (the one that has the captital Newark)?
Choices:
Morris County
Gloucester County
Bergen County
Burlington County
Essex County
Hudson County
Passaic County
Cumberland County
Hunterdon County
Monmouth County
Answer: Essex County
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 <capital> ?e_2 . ?e_2 <pred:name> "Newark" .  } ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
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: Newark
function: Relate
dependencies: 4
inputs: capital
backward
function: Find
inputs: Essex County
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: area
less