Question: How many metropolitan areas are named after Thousand Oaks or whose population is not 2200000000?
Choices:
3
4
5
6
7
8
9
10
11
12
Answer: 8
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "metropolitan area" .  { ?e <named_after> ?e_1 . ?e_1 <pred:name> "Thousand Oaks" .  } UNION { ?e <population> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> ?v . FILTER ( ?v != "2200000000"^^xsd:double ) .  } }
Program:
function: Find
inputs: Thousand Oaks
function: Relate
dependencies: 0
inputs: named after
backward
function: FilterConcept
dependencies: 1
inputs: metropolitan area
function: FindAll
function: FilterNum
dependencies: 3
inputs: population
2200000000
!=
function: FilterConcept
dependencies: 4
inputs: metropolitan area
function: Or
dependencies: 2
5
function: Count
dependencies: 6