Question: What is the FIPS 10-4 (countries and regions) of the metropolitan borough that has the capital Walsall (the one that is the twinned administrative body of Amritsar) ?
Choices:
UKM2
CA12
JM
TT
RP21
UKO8
FRB7
CH24
MR
TV
Answer: UKO8
SPARQL: SELECT DISTINCT ?pv WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "metropolitan borough" . ?e_1 <capital_of> ?e . ?e_1 <pred:name> "Walsall" . ?e_1 <twinned_administrative_body> ?e_2 . ?e_2 <pred:name> "Amritsar" .  ?e <FIPS_10-4_(countries_and_regions)> ?pv .  }
Program:
function: Find
inputs: Amritsar
function: Relate
dependencies: 0
inputs: twinned administrative body
backward
function: Find
inputs: Walsall
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: capital of
forward
function: FilterConcept
dependencies: 4
inputs: metropolitan borough
function: QueryAttr
dependencies: 5
inputs: FIPS 10-4 (countries and regions)