Question: How many Texan counties that lie within the US or contain the Dallas administrative division, which is the twinned administrative body of Taipei ?
Choices:
9
10
11
12
13
14
15
16
17
18
Answer: 17
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "county of Texas" .  { ?e <country> ?e_1 . ?e_1 <pred:name> "United States of America" .  } UNION { ?e <contains_administrative_territorial_entity> ?e_1 . ?e_1 <pred:name> "Dallas" . ?e_1 <twinned_administrative_body> ?e_2 . ?e_2 <pred:name> "Taipei" .  } }
Program:
function: Find
inputs: United States of America
function: Relate
dependencies: 0
inputs: country
backward
function: FilterConcept
dependencies: 1
inputs: county of Texas
function: Find
inputs: Taipei
function: Relate
dependencies: 3
inputs: twinned administrative body
backward
function: Find
inputs: Dallas
function: And
dependencies: 4
5
function: Relate
dependencies: 6
inputs: contains administrative territorial entity
backward
function: FilterConcept
dependencies: 7
inputs: county of Texas
function: Or
dependencies: 2
8
function: Count
dependencies: 9