Question: How many countries are the birthplace of Ben Foster (who is a member of Stoke City F.C.) or have Elizabeth II as head of state?
Choices:
0
1
2
3
4
5
6
7
8
9
Answer: 2
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "country" .  { ?e_1 <place_of_birth> ?e . ?e_1 <pred:name> "Ben Foster" . ?e_1 <member_of_sports_team> ?e_2 . ?e_2 <pred:name> "Stoke City F.C." .  } UNION { ?e <head_of_state> ?e_1 . ?e_1 <pred:name> "Elizabeth II" .  } }
Program:
function: Find
inputs: Stoke City F.C.
function: Relate
dependencies: 0
inputs: member of sports team
backward
function: Find
inputs: Ben Foster
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: place of birth
forward
function: FilterConcept
dependencies: 4
inputs: country
function: Find
inputs: Elizabeth II
function: Relate
dependencies: 6
inputs: head of state
backward
function: FilterConcept
dependencies: 7
inputs: country
function: Or
dependencies: 5
8
function: Count
dependencies: 9