Question: How many capitals have an area less than 5800 square kilometres?
Choices:
26
27
28
29
30
31
32
33
34
35
Answer: 32
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "capital" . ?e <area> ?pv . ?pv <pred:unit> "square kilometre" . ?pv <pred:value> ?v . FILTER ( ?v < "5800"^^xsd:double ) .  }
Program:
function: FindAll
function: FilterNum
dependencies: 0
inputs: area
5800 square kilometre
<
function: FilterConcept
dependencies: 1
inputs: capital
function: Count
dependencies: 2