Question: Which area is smaller, Sardinia (the one that locates in the continent of Europe) or Great Britain?
Choices:
Maui
Newfoundland
Great Britain
Puerto Rico
Long Island
Cyprus
Ireland
Tasmania
Sardinia
Hawaii
Program:
function: Find
inputs: Europe
function: Relate
dependencies: 0
inputs: continent
backward
function: Find
inputs: Sardinia
function: And
dependencies: 1
2
function: Find
inputs: Great Britain
function: SelectBetween
dependencies: 3
4
inputs: area
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Sardinia" . ?e <continent> ?e_1 . ?e_1 <pred:name> "Europe" .   } UNION { ?e <pred:name> "Great Britain" .  } ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Sardinia