Question: What is the number of basketball teams that drafts Kareem Abdul-Jabbar or that has Michael jackson (who belongs to USA) as a member.
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> "basketball team" .  { ?e_1 <drafted_by> ?e . ?e_1 <pred:name> "Kareem Abdul-Jabbar" .  } UNION { ?e_1 <member_of_sports_team> ?e . ?e_1 <pred:name> "Michael Jackson" . ?e_1 <country_for_sport> ?e_2 . ?e_2 <pred:name> "United States of America" .  } }
Program:
function: Find
inputs: Kareem Abdul-Jabbar
function: Relate
dependencies: 0
inputs: drafted by
forward
function: FilterConcept
dependencies: 1
inputs: basketball team
function: Find
inputs: United States of America
function: Relate
dependencies: 3
inputs: country for sport
backward
function: Find
inputs: Michael Jackson
function: And
dependencies: 4
5
function: Relate
dependencies: 6
inputs: member of sports team
forward
function: FilterConcept
dependencies: 7
inputs: basketball team
function: Or
dependencies: 2
8
function: Count
dependencies: 9