Question: How many states in India are located in India (the one that has a diplomatic relation with United Arab Emirates)?
Choices: 23
24
25
26
27
28
29
30
31
32
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "state of India" . ?e <located_in_the_administrative_territorial_entity> ?e_1 . ?e_1 <pred:name> "India" . ?e_2 <diplomatic_relation> ?e_1 . ?e_2 <pred:name> "United Arab Emirates" .   }
Program:
function: Find
inputs: United Arab Emirates
function: Relate
dependencies: 0
inputs: diplomatic relation
forward
function: Find
inputs: India
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: located in the administrative territorial entity
backward
function: FilterConcept
dependencies: 4
inputs: state of India
function: Count
dependencies: 5
Answer: 23