Question: How many scientists work in the field of astronomy or are the main subject of The Right Stuff (the one whose duration is 184 minute)?
Choices:
0
1
2
3
4
5
6
7
8
9
Answer: 2
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "scientist" .  { ?e <field_of_this_occupation> ?e_1 . ?e_1 <pred:name> "astronomy" .  } UNION { ?e_1 <main_subject> ?e . ?e_1 <pred:name> "The Right Stuff" . ?e_1 <duration> ?pv . ?pv <pred:unit> "minute" . ?pv <pred:value> "184"^^xsd:double .  } }
Program:
function: Find
inputs: astronomy
function: Relate
dependencies: 0
inputs: field of this occupation
backward
function: FilterConcept
dependencies: 1
inputs: scientist
function: Find
inputs: The Right Stuff
function: FilterNum
dependencies: 3
inputs: duration
184 minute
=
function: Relate
dependencies: 4
inputs: main subject
forward
function: FilterConcept
dependencies: 5
inputs: scientist
function: Or
dependencies: 2
6
function: Count
dependencies: 7