Question: What is the number of astronomical object types that is the parent astronomical body of asteroid belt or that has absolute magnitude under 4.9
Choices:
0
1
2
3
4
5
6
7
8
9
Answer: 1
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "astronomical object type" .  { ?e_1 <parent_astronomical_body> ?e . ?e_1 <pred:name> "asteroid belt" .  } UNION { ?e <absolute_magnitude> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> ?v . FILTER ( ?v < "4.9"^^xsd:double ) .  } }
Program:
function: Find
inputs: asteroid belt
function: Relate
dependencies: 0
inputs: parent astronomical body
forward
function: FilterConcept
dependencies: 1
inputs: astronomical object type
function: FindAll
function: FilterNum
dependencies: 3
inputs: absolute magnitude
4.9
<
function: FilterConcept
dependencies: 4
inputs: astronomical object type
function: Or
dependencies: 2
5
function: Count
dependencies: 6