Question: Which one has a smaller population, Cambridge (the one that contains Peterhouse) or West Dorset?
Choices:
Guildford
North Norfolk
Great Yarmouth
Chichester
Woking
South Somerset
West Dorset
Craven
Kettering
Cambridge
Program:
function: Find
inputs: Peterhouse
function: Relate
dependencies: 0
inputs: located in the administrative territorial entity
forward
function: Find
inputs: Cambridge
function: And
dependencies: 1
2
function: Find
inputs: West Dorset
function: SelectBetween
dependencies: 3
4
inputs: population
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Cambridge" . ?e_1 <located_in_the_administrative_territorial_entity> ?e . ?e_1 <pred:name> "Peterhouse" .   } UNION { ?e <pred:name> "West Dorset" .  } ?e <population> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: West Dorset