Question: How is Thomas Jefferson, with Sam Waterston as a cast member, related to the documentary film genre?
Choices:
student of
place of birth
exported to
after a work by
member of sports team
office held by head of the organisation
fictional universe described in
genre
work location
notable work
Answer: genre
SPARQL: SELECT DISTINCT ?p WHERE { ?e_1 <pred:name> "Thomas Jefferson" . ?e_1 <cast_member> ?e_3 . ?e_3 <pred:name> "Sam Waterston" . ?e_2 <pred:name> "documentary film" . ?e_1 ?p ?e_2 .  }
Program:
function: Find
inputs: Sam Waterston
function: Relate
dependencies: 0
inputs: cast member
backward
function: Find
inputs: Thomas Jefferson
function: And
dependencies: 1
2
function: Find
inputs: documentary film
function: QueryRelation
dependencies: 3
4