Question: How many colleges of the University of Cambridge are different from Trinity College (that has 380 students) or are located in Cambridge (that contains Peterhouse)?
Choices: 8
9
10
11
12
13
14
15
16
17
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "college of the University of Cambridge" .  { ?e <different_from> ?e_1 . ?e_1 <pred:name> "Trinity College" . ?e_1 <students_count> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> "380"^^xsd:double .  } UNION { ?e <located_in_the_administrative_territorial_entity> ?e_1 . ?e_1 <pred:name> "Cambridge" . ?e_2 <located_in_the_administrative_territorial_entity> ?e_1 . ?e_2 <pred:name> "Peterhouse" .  } }
Program:
function: Find
inputs: Trinity College
function: FilterNum
dependencies: 0
inputs: students count
380
=
function: Relate
dependencies: 1
inputs: different from
backward
function: FilterConcept
dependencies: 2
inputs: college of the University of Cambridge
function: Find
inputs: Peterhouse
function: Relate
dependencies: 4
inputs: located in the administrative territorial entity
forward
function: Find
inputs: Cambridge
function: And
dependencies: 5
6
function: Relate
dependencies: 7
inputs: located in the administrative territorial entity
backward
function: FilterConcept
dependencies: 8
inputs: college of the University of Cambridge
function: Or
dependencies: 3
9
function: Count
dependencies: 10
Answer: 17