Question: Is the percentage of water area smaller for Rotterdam (official name Rotterdam) or Haarlem?
Choices:
Trieste
Haarlem
Cork
Santo Domingo
Chihuahua
Abidjan
Dundee
Rotterdam
Bergen
Kingston
Program:
function: Find
inputs: Rotterdam
function: FilterStr
dependencies: 0
inputs: official name
Rotterdam
function: Find
inputs: Haarlem
function: SelectBetween
dependencies: 1
2
inputs: water as percent of area
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Rotterdam" . ?e <official_name> ?pv_1 . ?pv_1 <pred:value> "Rotterdam" . } UNION { ?e <pred:name> "Haarlem" . } ?e <water_as_percent_of_area> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Haarlem