Question: Which has more area, Norfolk that borders Lincolnshire or Gloucestershire whose population is 861700?
Choices:
Derbyshire
Norfolk
Gloucestershire
West Midlands
Somerset
Cumbria
Essex
Northumberland
Warwickshire
Staffordshire
Answer: Norfolk
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Norfolk" . ?e <shares_border_with> ?e_1 . ?e_1 <pred:name> "Lincolnshire" . } UNION { ?e <pred:name> "Gloucestershire" . ?e <population> ?pv_1 . ?pv_1 <pred:unit> "1" . ?pv_1 <pred:value> "861700"^^xsd:double . } ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Program:
function: Find
inputs: Lincolnshire
function: Relate
dependencies: 0
inputs: shares border with
backward
function: Find
inputs: Norfolk
function: And
dependencies: 1
2
function: Find
inputs: Gloucestershire
function: FilterNum
dependencies: 4
inputs: population
861700
=
function: SelectBetween
dependencies: 3
5
inputs: area
greater