Question: Which prefecture of Japan that shares a border with Gifu Prefecture has the largest area?
Choices:
Okinawa Prefecture
Kanagawa Prefecture
Aichi Prefecture
Saitama Prefecture
Niigata Prefecture
Nagano Prefecture
Miyagi Prefecture
Chiba Prefecture
Fukushima Prefecture
Ōsaka 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: area
largest
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 <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Nagano Prefecture