Question: Does Lisbon, postal codes 1000–1900, or Riga take up a smaller area?
Choices:
Mexico City
Doha
Moscow
Lisbon
Paris
Riga
Sarajevo
Tallinn
Manila
Lausanne
Program:
function: Find
inputs: Lisbon
function: FilterStr
dependencies: 0
inputs: postal code
1000–1900
function: Find
inputs: Riga
function: SelectBetween
dependencies: 1
2
inputs: area
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Lisbon" . ?e <postal_code> ?pv_1 . ?pv_1 <pred:value> "1000–1900" . } UNION { ?e <pred:name> "Riga" . } ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Lisbon