Question: How many Illinois counties are an administrative division of Illinois (the one that contains Wheaton) or are the twinned administrative body of Valletta?
Choices: 13
14
15
16
17
18
19
20
21
22
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "county of Illinois" .  { ?e_1 <contains_administrative_territorial_entity> ?e . ?e_1 <pred:name> "Illinois" . ?e_2 <located_in_the_administrative_territorial_entity> ?e_1 . ?e_2 <pred:name> "Wheaton" .  } UNION { ?e <twinned_administrative_body> ?e_1 . ?e_1 <pred:name> "Valletta" .  } }
Program:
function: Find
inputs: Wheaton
function: Relate
dependencies: 0
inputs: located in the administrative territorial entity
forward
function: Find
inputs: Illinois
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: contains administrative territorial entity
forward
function: FilterConcept
dependencies: 4
inputs: county of Illinois
function: Find
inputs: Valletta
function: Relate
dependencies: 6
inputs: twinned administrative body
backward
function: FilterConcept
dependencies: 7
inputs: county of Illinois
function: Or
dependencies: 5
8
function: Count
dependencies: 9
Answer: 18