Question: Which area is smaller, Leeds (the one that is the headquarter location of University of Leeds) or Ōsaka?
Choices:
Kilkenny
Cork
Trieste
Dundee
Bergen
Kingston
Santo Domingo
Abidjan
Ōsaka
Chihuahua
Program:
function: Find
inputs: University of Leeds
function: Relate
dependencies: 0
inputs: headquarters location
forward
function: Find
inputs: Leeds
function: And
dependencies: 1
2
function: Find
inputs: Ōsaka
function: SelectBetween
dependencies: 3
4
inputs: area
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Leeds" . ?e_1 <headquarters_location> ?e . ?e_1 <pred:name> "University of Leeds" .   } UNION { ?e <pred:name> "Ōsaka" .  } ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Ōsaka