Question: Which has less area, West Midlands that borders Warwickshire or Somerset whose FIPS 10-4 (countries and regions) is UKM3?
Choices:
Hertfordshire
Warwickshire
Derbyshire
West Midlands
Somerset
Norfolk
Northumberland
Cumbria
Staffordshire
East Riding of Yorkshire
Answer: West Midlands
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "West Midlands" . ?e_1 <shares_border_with> ?e . ?e_1 <pred:name> "Warwickshire" . } UNION { ?e <pred:name> "Somerset" . ?e <FIPS_10-4_(countries_and_regions)> ?pv_1 . ?pv_1 <pred:value> "UKM3" . } ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Program:
function: Find
inputs: Warwickshire
function: Relate
dependencies: 0
inputs: shares border with
forward
function: Find
inputs: West Midlands
function: And
dependencies: 1
2
function: Find
inputs: Somerset
function: FilterStr
dependencies: 4
inputs: FIPS 10-4 (countries and regions)
UKM3
function: SelectBetween
dependencies: 3
5
inputs: area
less