Question: How many Canadian provinces are distinct from Quebec City or have postal code A ?
Choices:
2
3
4
5
6
7
8
9
10
11
Answer: 2
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "province of Canada" .  { ?e <postal_code> ?pv . ?pv <pred:value> "A" .  } UNION { ?e_1 <different_from> ?e . ?e_1 <pred:name> "Quebec City" .  } }
Program:
function: FindAll
function: FilterStr
dependencies: 0
inputs: postal code
A
function: FilterConcept
dependencies: 1
inputs: province of Canada
function: Find
inputs: Quebec City
function: Relate
dependencies: 3
inputs: different from
forward
function: FilterConcept
dependencies: 4
inputs: province of Canada
function: Or
dependencies: 2
5
function: Count
dependencies: 6