Question: Does Santa Cruz County that borders Monterey County or Placer County have smaller area?
Choices:
Contra Costa County
Mariposa County
Santa Cruz County
Placer County
San Mateo County
Butte County
Tuolumne County
Solano County
Alameda County
Tulare County
Program:
function: Find
inputs: Monterey County
function: Relate
dependencies: 0
inputs: shares border with
backward
function: Find
inputs: Santa Cruz County
function: And
dependencies: 1
2
function: Find
inputs: Placer County
function: SelectBetween
dependencies: 3
4
inputs: area
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Santa Cruz County" . ?e <shares_border_with> ?e_1 . ?e_1 <pred:name> "Monterey County" .   } UNION { ?e <pred:name> "Placer County" .  } ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Santa Cruz County