Question: Which area is bigger, St. Lawrence County or Monroe County (the one that shares border with Ontario County)?
Choices:
Clinton County
Albany County
St. Lawrence County
Orange County
Greene County
Warren County
Rensselaer County
Jefferson County
Niagara County
Cayuga County
Program:
function: Find
inputs: St. Lawrence County
function: Find
inputs: Ontario County
function: Relate
dependencies: 1
inputs: shares border with
forward
function: Find
inputs: Monroe County
function: And
dependencies: 2
3
function: SelectBetween
dependencies: 0
4
inputs: area
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "St. Lawrence County" .  } UNION { ?e <pred:name> "Monroe County" . ?e_1 <shares_border_with> ?e . ?e_1 <pred:name> "Ontario County" .   } ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: St. Lawrence County