Question: Which area is smaller, Fresno County or Lake County (the one that shares border with Sonoma County)?
Choices:
Fresno County
San Diego County
Butte County
Alameda County
Lake County
Tulare County
Contra Costa County
Mariposa County
San Mateo County
Solano County
Answer: Lake County
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Fresno County" .  } UNION { ?e <pred:name> "Lake County" . ?e <shares_border_with> ?e_1 . ?e_1 <pred:name> "Sonoma County" .   } ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Program:
function: Find
inputs: Fresno County
function: Find
inputs: Sonoma County
function: Relate
dependencies: 1
inputs: shares border with
backward
function: Find
inputs: Lake County
function: And
dependencies: 2
3
function: SelectBetween
dependencies: 0
4
inputs: area
less