Question: Which has the smallest area among the Japan prefectures that border Tokyo which is the twinned administrative body of Beijing?
Choices:
Kanagawa Prefecture
Ōsaka Prefecture
Aichi Prefecture
Miyagi Prefecture
Nagano Prefecture
Chiba Prefecture
Niigata Prefecture
Okinawa Prefecture
Fukuoka Prefecture
Saitama Prefecture
Program:
function: Find
inputs: Beijing
function: Relate
dependencies: 0
inputs: twinned administrative body
backward
function: Find
inputs: Tokyo
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: shares border with
backward
function: FilterConcept
dependencies: 4
inputs: prefecture of Japan
function: SelectAmong
dependencies: 5
inputs: area
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> "Tokyo" . ?e_1 <twinned_administrative_body> ?e_2 . ?e_2 <pred:name> "Beijing" .  ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Kanagawa Prefecture