Question: What prefecture of Japan has the smallest population of those that share a border with the Gifu Prefecture?
Choices:
Nagano Prefecture
Ōsaka Prefecture
Aichi Prefecture
Fukushima Prefecture
Niigata Prefecture
Saitama Prefecture
Chiba Prefecture
Kanagawa Prefecture
Fukuoka Prefecture
Okinawa Prefecture
Program:
function: Find
inputs: Gifu Prefecture
function: Relate
dependencies: 0
inputs: shares border with
backward
function: FilterConcept
dependencies: 1
inputs: prefecture of Japan
function: SelectAmong
dependencies: 2
inputs: population
smallest
SPARQL: SELECT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "prefecture of Japan" . ?e <shares_border_with> ?e_1 . ?e_1 <pred:name> "Gifu Prefecture" .  ?e <population> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Nagano Prefecture