Question: How many museums collect works of Michelangelo (the one that has the occupation of architect) or have a visitor count not equal to 5900000 per year?
Choices:
2
3
4
5
6
7
8
9
10
11
Answer: 7
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "museum" .  { ?e_1 <works_in_collection> ?e . ?e_1 <pred:name> "Michelangelo" . ?e_1 <occupation> ?e_2 . ?e_2 <pred:name> "architect" .  } UNION { ?e <visitors_per_year> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> ?v . FILTER ( ?v != "5900000"^^xsd:double ) .  } }
Program:
function: Find
inputs: architect
function: Relate
dependencies: 0
inputs: occupation
backward
function: Find
inputs: Michelangelo
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: works in collection
forward
function: FilterConcept
dependencies: 4
inputs: museum
function: FindAll
function: FilterNum
dependencies: 6
inputs: visitors per year
5900000
!=
function: FilterConcept
dependencies: 7
inputs: museum
function: Or
dependencies: 5
8
function: Count
dependencies: 9