Question: What ceremonial county of England has a population greater than 900 (the point in time of this statement is 2015) and shares a border with Gloucestershire (the one that shares border with Warwickshire)?
Choices: Staffordshire
Essex
Cumbria
Lincolnshire
Somerset
West Midlands
Warwickshire
Derbyshire
Northamptonshire
Suffolk
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "ceremonial county of England" . ?e <population> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> ?v . FILTER ( ?v > "900"^^xsd:double ) . [ <pred:fact_h> ?e ; <pred:fact_r> <population> ; <pred:fact_t> ?pv ] <point_in_time> ?qpv . ?qpv <pred:year> 2015 . ?e <shares_border_with> ?e_1 . ?e_1 <pred:name> "Gloucestershire" . ?e_2 <shares_border_with> ?e_1 . ?e_2 <pred:name> "Warwickshire" .  }
Program:
function: FindAll
function: FilterNum
dependencies: 0
inputs: population
900
>
function: QFilterYear
dependencies: 1
inputs: point in time
2015
=
function: FilterConcept
dependencies: 2
inputs: ceremonial county of England
function: Find
inputs: Warwickshire
function: Relate
dependencies: 4
inputs: shares border with
forward
function: Find
inputs: Gloucestershire
function: And
dependencies: 5
6
function: Relate
dependencies: 7
inputs: shares border with
backward
function: FilterConcept
dependencies: 8
inputs: ceremonial county of England
function: And
dependencies: 3
9
function: What
dependencies: 10
Answer: Somerset