Question: How many New Jersey cities share a border with the city Jeffrey Wright lives in, Brooklyn?
Choices: 0
1
2
3
4
5
6
7
8
9
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "city in New Jersey" . ?e_1 <shares_border_with> ?e . ?e_1 <pred:name> "Brooklyn" . ?e_2 <residence> ?e_1 . ?e_2 <pred:name> "Jeffrey Wright" .   }
Program:
function: Find
inputs: Jeffrey Wright
function: Relate
dependencies: 0
inputs: residence
forward
function: Find
inputs: Brooklyn
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: shares border with
forward
function: FilterConcept
dependencies: 4
inputs: city in New Jersey
function: Count
dependencies: 5
Answer: 2