Question: What is the largest New York County sharing a border with Fairfield County in Connecticut?
Choices:
Orange County
Dutchess County
Cayuga County
Warren County
Clinton County
Niagara County
Albany County
Jefferson County
Putnam County
Greene County
Program:
function: Find
inputs: Connecticut
function: Relate
dependencies: 0
inputs: located in the administrative territorial entity
backward
function: Find
inputs: Fairfield County
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: shares border with
forward
function: FilterConcept
dependencies: 4
inputs: county of New York
function: SelectAmong
dependencies: 5
inputs: area
largest
SPARQL: SELECT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "county of New York" . ?e_1 <shares_border_with> ?e . ?e_1 <pred:name> "Fairfield County" . ?e_1 <located_in_the_administrative_territorial_entity> ?e_2 . ?e_2 <pred:name> "Connecticut" .  ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Dutchess County