Question: Between Tasmania (the one that locates in the continent of Oceania) and Sardinia (the one that locates in the continent of Europe) which has leas area?
Choices:
Sardinia
Hawaii
Newfoundland
Cyprus
Long Island
Puerto Rico
Maui
Tasmania
Guernsey
Ireland
Program:
function: Find
inputs: Oceania
function: Relate
dependencies: 0
inputs: continent
backward
function: Find
inputs: Tasmania
function: And
dependencies: 1
2
function: Find
inputs: Europe
function: Relate
dependencies: 4
inputs: continent
backward
function: Find
inputs: Sardinia
function: And
dependencies: 5
6
function: SelectBetween
dependencies: 3
7
inputs: area
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Tasmania" . ?e <continent> ?e_1 . ?e_1 <pred:name> "Oceania" .   } UNION { ?e <pred:name> "Sardinia" . ?e <continent> ?e_2 . ?e_2 <pred:name> "Europe" .  } ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Sardinia