Question: Which first-level administrative country subdivision that is the twinned administrative body of Shanghai (that is the twinned administrative body of Pomeranian Voivodeship) has the smallest area?
Choices:
Queensland
Lublin Voivodeship
Jalisco
Greater Poland Voivodeship
KwaZulu-Natal
Upper Austria
Minas Gerais
England
Chiapas
Pomeranian Voivodeship
Program:
function: Find
inputs: Pomeranian Voivodeship
function: Relate
dependencies: 0
inputs: twinned administrative body
backward
function: Find
inputs: Shanghai
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: twinned administrative body
forward
function: FilterConcept
dependencies: 4
inputs: first-level administrative country subdivision
function: SelectAmong
dependencies: 5
inputs: area
smallest
SPARQL: SELECT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "first-level administrative country subdivision" . ?e_1 <twinned_administrative_body> ?e . ?e_1 <pred:name> "Shanghai" . ?e_1 <twinned_administrative_body> ?e_2 . ?e_2 <pred:name> "Pomeranian Voivodeship" .  ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Pomeranian Voivodeship