Question: Which one is of larger area, Wayne County (bordering Macomb County, or Tuscola County ?
Choices:
Marquette County
Saginaw County
Wayne County
Tuscola County
Monroe County
Berrien County
Clinton County
Washtenaw County
Genesee County
Kent County
Program:
function: Find
inputs: Macomb County
function: Relate
dependencies: 0
inputs: shares border with
forward
function: Find
inputs: Wayne County
function: And
dependencies: 1
2
function: Find
inputs: Tuscola County
function: SelectBetween
dependencies: 3
4
inputs: area
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Wayne County" . ?e_1 <shares_border_with> ?e . ?e_1 <pred:name> "Macomb County" .   } UNION { ?e <pred:name> "Tuscola County" .  } ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Tuscola County