Question: How many organizations are either the production company of Great Expectations with Robbie Coltrane or are owned by Metro-Goldwyn-Mayer?
Choices: 1
2
3
4
5
6
7
8
9
10
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "organization" .  { ?e_1 <production_company> ?e . ?e_1 <pred:name> "Great Expectations" . ?e_1 <cast_member> ?e_2 . ?e_2 <pred:name> "Robbie Coltrane" .  } UNION { ?e_1 <owner_of> ?e . ?e_1 <pred:name> "Metro-Goldwyn-Mayer" .  } }
Program:
function: Find
inputs: Robbie Coltrane
function: Relate
dependencies: 0
inputs: cast member
backward
function: Find
inputs: Great Expectations
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: production company
forward
function: FilterConcept
dependencies: 4
inputs: organization
function: Find
inputs: Metro-Goldwyn-Mayer
function: Relate
dependencies: 6
inputs: owner of
forward
function: FilterConcept
dependencies: 7
inputs: organization
function: Or
dependencies: 5
8
function: Count
dependencies: 9
Answer: 2