Question: Which one has more area, Perth (the one whose official name is Perth) or Turku?
Choices:
Chihuahua
Abidjan
Kingston
Trieste
Kilkenny
Perth
Turku
Santo Domingo
Dundee
Bergen
Program:
function: Find
inputs: Perth
function: FilterStr
dependencies: 0
inputs: official name
Perth
function: Find
inputs: Turku
function: SelectBetween
dependencies: 1
2
inputs: area
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Perth" . ?e <official_name> ?pv_1 . ?pv_1 <pred:value> "Perth" . } UNION { ?e <pred:name> "Turku" . } ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Perth