Question: How many towns in the US do we know whose area does not match 5,100,000 square km or that were named after Greenwich (with Dewey Decimal Classification 2--42162) ?
Choices: 3
4
5
6
7
8
9
10
11
12
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "town of the United States" .  { ?e <area> ?pv . ?pv <pred:unit> "square kilometre" . ?pv <pred:value> ?v . FILTER ( ?v != "5100000"^^xsd:double ) .  } UNION { ?e <named_after> ?e_1 . ?e_1 <pred:name> "Greenwich" . ?e_1 <Dewey_Decimal_Classification> ?pv . ?pv <pred:value> "2--42162" .  } }
Program:
function: FindAll
function: FilterNum
dependencies: 0
inputs: area
5100000 square kilometre
!=
function: FilterConcept
dependencies: 1
inputs: town of the United States
function: Find
inputs: Greenwich
function: FilterStr
dependencies: 3
inputs: Dewey Decimal Classification
2--42162
function: Relate
dependencies: 4
inputs: named after
backward
function: FilterConcept
dependencies: 5
inputs: town of the United States
function: Or
dependencies: 2
6
function: Count
dependencies: 7
Answer: 10