Question: Is there a greater area in Bhopal or Lisbon (the one whose postal code is 1000–1900)?
Choices:
Tallinn
Riga
New Delhi
Manila
Doha
Mexico City
Lisbon
Bhopal
Sarajevo
Lausanne
Answer: Bhopal
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Bhopal" . } UNION { ?e <pred:name> "Lisbon" . ?e <postal_code> ?pv_1 . ?pv_1 <pred:value> "1000–1900" . } ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Program:
function: Find
inputs: Bhopal
function: Find
inputs: Lisbon
function: FilterStr
dependencies: 1
inputs: postal code
1000–1900
function: SelectBetween
dependencies: 0
2
inputs: area
greater