Question: What is the connection between Stockton-on-Tees (the one that is located in County Durham) to North Yorkshire (the one that shares border with East Riding of Yorkshire)?
Choices:
product or material produced
country for sport
located in the administrative territorial entity
fictional universe described in
executive producer
works in collection
talk show guest
director
official language
health specialty
Answer: located in the administrative territorial entity
SPARQL: SELECT DISTINCT ?p WHERE { ?e_1 <pred:name> "Stockton-on-Tees" . ?e_1 <located_in_the_administrative_territorial_entity> ?e_3 . ?e_3 <pred:name> "County Durham" . ?e_2 <pred:name> "North Yorkshire" . ?e_2 <shares_border_with> ?e_4 . ?e_4 <pred:name> "East Riding of Yorkshire" . ?e_1 ?p ?e_2 .  }
Program:
function: Find
inputs: County Durham
function: Relate
dependencies: 0
inputs: located in the administrative territorial entity
backward
function: Find
inputs: Stockton-on-Tees
function: And
dependencies: 1
2
function: Find
inputs: East Riding of Yorkshire
function: Relate
dependencies: 4
inputs: shares border with
backward
function: Find
inputs: North Yorkshire
function: And
dependencies: 5
6
function: QueryRelation
dependencies: 3
7