Question: Which area is smaller, Cambridgeshire (the one that shares border with Hertfordshire) or Kent (the one whose area is 3736 square kilometre)?
Choices:
Warwickshire
Essex
Cambridgeshire
Somerset
Kent
Derbyshire
West Midlands
Norfolk
Cumbria
Northumberland
Program:
function: Find
inputs: Hertfordshire
function: Relate
dependencies: 0
inputs: shares border with
forward
function: Find
inputs: Cambridgeshire
function: And
dependencies: 1
2
function: Find
inputs: Kent
function: FilterNum
dependencies: 4
inputs: area
3736 square kilometre
=
function: SelectBetween
dependencies: 3
5
inputs: area
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Cambridgeshire" . ?e_1 <shares_border_with> ?e . ?e_1 <pred:name> "Hertfordshire" . } UNION { ?e <pred:name> "Kent" . ?e <area> ?pv_1 . ?pv_1 <pred:unit> "square kilometre" . ?pv_1 <pred:value> "3736"^^xsd:double . } ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Cambridgeshire