Question: Does Cuba (located in the Caribbean) or Crete have a smaller population?
Choices:
Hawaii
Tasmania
Cuba
Maui
Puerto Rico
Ireland
Trinidad
Crete
Long Island
Cyprus
Program:
function: Find
inputs: Caribbean Sea
function: Relate
dependencies: 0
inputs: located in or next to body of water
backward
function: Find
inputs: Cuba
function: And
dependencies: 1
2
function: Find
inputs: Crete
function: SelectBetween
dependencies: 3
4
inputs: population
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Cuba" . ?e <located_in_or_next_to_body_of_water> ?e_1 . ?e_1 <pred:name> "Caribbean Sea" .   } UNION { ?e <pred:name> "Crete" .  } ?e <population> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Crete