Question: Which state of India shares border with West Bengal (the one that shares border with Bihar) and has ISO 3166-2 code as IN-JH ?
Choices:
Odisha
Andhra Pradesh
Karnataka
Himachal Pradesh
Sikkim
Maharashtra
Punjab
Jharkhand
Kerala
Bihar
Program:
function: Find
inputs: Bihar
function: Relate
dependencies: 0
inputs: shares border with
forward
function: Find
inputs: West Bengal
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: shares border with
forward
function: FilterConcept
dependencies: 4
inputs: state of India
function: FindAll
function: FilterStr
dependencies: 6
inputs: ISO 3166-2 code
IN-JH
function: FilterConcept
dependencies: 7
inputs: state of India
function: And
dependencies: 5
8
function: What
dependencies: 9
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "state of India" . ?e_1 <shares_border_with> ?e . ?e_1 <pred:name> "West Bengal" . ?e_2 <shares_border_with> ?e_1 . ?e_2 <pred:name> "Bihar" .  ?e <ISO_3166-2_code> ?pv . ?pv <pred:value> "IN-JH" .  }
Answer: Jharkhand