Question: How many wars are the main subject of Kundun or have an end time after 1865?
Choices:
17
18
19
20
21
22
23
24
25
26
Answer: 23
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "war" .  { ?e_1 <main_subject> ?e . ?e_1 <pred:name> "Kundun" .  } UNION { ?e <end_time> ?pv . ?pv <pred:year> ?v . FILTER ( ?v > 1865 ) .  } }
Program:
function: Find
inputs: Kundun
function: Relate
dependencies: 0
inputs: main subject
forward
function: FilterConcept
dependencies: 1
inputs: war
function: FindAll
function: FilterYear
dependencies: 3
inputs: end time
1865
>
function: FilterConcept
dependencies: 4
inputs: war
function: Or
dependencies: 2
5
function: Count
dependencies: 6