Question: How many Ireland counties are an administrative division of Ireland (whose out-of-school children number is 3412) or have an area not equal to 6800000 square metres?
Choices: 17
18
19
20
21
22
23
24
25
26
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "county of Ireland" .  { ?e_1 <contains_administrative_territorial_entity> ?e . ?e_1 <pred:name> "Ireland" . ?e_1 <number_of_out-of-school_children> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> "3412"^^xsd:double .  } UNION { ?e <area> ?pv . ?pv <pred:unit> "square metre" . ?pv <pred:value> ?v . FILTER ( ?v != "6800000"^^xsd:double ) .  } }
Program:
function: Find
inputs: Ireland
function: FilterNum
dependencies: 0
inputs: number of out-of-school children
3412
=
function: Relate
dependencies: 1
inputs: contains administrative territorial entity
forward
function: FilterConcept
dependencies: 2
inputs: county of Ireland
function: FindAll
function: FilterNum
dependencies: 4
inputs: area
6800000 square metre
!=
function: FilterConcept
dependencies: 5
inputs: county of Ireland
function: Or
dependencies: 3
6
function: Count
dependencies: 7
Answer: 18