Question: What is the relationship between Kent (the one that shares border with Greater London) and Maidstone (the one whose OS grid reference is TQ765555)?
Choices:
substitute/deputy/replacement of office/officeholder
movement
does not have part
spouse
capital
platform
mother
rector
medical treatment
operating area
Answer: capital
SPARQL: SELECT DISTINCT ?p WHERE { ?e_1 <pred:name> "Kent" . ?e_3 <shares_border_with> ?e_1 . ?e_3 <pred:name> "Greater London" . ?e_2 <pred:name> "Maidstone" . ?e_2 <OS_grid_reference> ?pv . ?pv <pred:value> "TQ765555" . ?e_1 ?p ?e_2 .  }
Program:
function: Find
inputs: Greater London
function: Relate
dependencies: 0
inputs: shares border with
forward
function: Find
inputs: Kent
function: And
dependencies: 1
2
function: Find
inputs: Maidstone
function: FilterStr
dependencies: 4
inputs: OS grid reference
TQ765555
function: QueryRelation
dependencies: 3
5