Question: Which has more area, Oxford or Bedford whose area is 20.2 square kilometres?
Choices:
Warwick
Guildford
Bedford
Maidstone
Aylesbury
Oxford
Taunton
Ipswich
Dorchester
Reading
Program:
function: Find
inputs: Oxford
function: Find
inputs: Bedford
function: FilterNum
dependencies: 1
inputs: area
20.2 square kilometre
=
function: SelectBetween
dependencies: 0
2
inputs: area
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Oxford" . } UNION { ?e <pred:name> "Bedford" . ?e <area> ?pv_1 . ?pv_1 <pred:unit> "square kilometre" . ?pv_1 <pred:value> "20.2"^^xsd:double . } ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Oxford