Question: Which area is larger, Worcester (the one whose country is United Kingdom) or Markham?
Choices:
Cork
Chihuahua
Trieste
Worcester
Bergen
Abidjan
Kilkenny
Markham
Dundee
Santo Domingo
Program:
function: Find
inputs: United Kingdom
function: Relate
dependencies: 0
inputs: country
backward
function: Find
inputs: Worcester
function: And
dependencies: 1
2
function: Find
inputs: Markham
function: SelectBetween
dependencies: 3
4
inputs: area
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Worcester" . ?e <country> ?e_1 . ?e_1 <pred:name> "United Kingdom" .   } UNION { ?e <pred:name> "Markham" .  } ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Markham