Question: Which one has more prominent height (over ocean level), Salvador (the one whose demonym is soteropolitano) or Johannesburg
Choices:
Abidjan
Chihuahua
Salvador
Cork
Kilkenny
Trieste
Bergen
Johannesburg
Santo Domingo
Kingston
Program:
function: Find
inputs: Salvador
function: FilterStr
dependencies: 0
inputs: demonym
soteropolitano
function: Find
inputs: Johannesburg
function: SelectBetween
dependencies: 1
2
inputs: elevation above sea level
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Salvador" . ?e <demonym> ?pv_1 . ?pv_1 <pred:value> "soteropolitano" . } UNION { ?e <pred:name> "Johannesburg" . } ?e <elevation_above_sea_level> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Johannesburg