Question: Does Orange County (the one that shares border with Rockland County) or Hamilton County (the one that shares border with Herkimer County) have less area?
Choices:
Niagara County
Cayuga County
Jefferson County
Warren County
Clinton County
Orange County
Rensselaer County
Greene County
Hamilton County
Chautauqua County
Program:
function: Find
inputs: Rockland County
function: Relate
dependencies: 0
inputs: shares border with
backward
function: Find
inputs: Orange County
function: And
dependencies: 1
2
function: Find
inputs: Herkimer County
function: Relate
dependencies: 4
inputs: shares border with
backward
function: Find
inputs: Hamilton County
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: area
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Orange County" . ?e <shares_border_with> ?e_1 . ?e_1 <pred:name> "Rockland County" .   } UNION { ?e <pred:name> "Hamilton County" . ?e <shares_border_with> ?e_2 . ?e_2 <pred:name> "Herkimer County" .  } ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Orange County