Question: What is the relation between Wonder Woman (with Cary Elwes as a cast member) and David E. Kelley?
Choices:
uses
country
screenwriter
foundational text
hair color
destination point
does not have part
operator
twinned administrative body
territory overlaps
Program:
function: Find
inputs: Cary Elwes
function: Relate
dependencies: 0
inputs: cast member
backward
function: Find
inputs: Wonder Woman
function: And
dependencies: 1
2
function: Find
inputs: David E. Kelley
function: QueryRelation
dependencies: 3
4
SPARQL: SELECT DISTINCT ?p WHERE { ?e_1 <pred:name> "Wonder Woman" . ?e_1 <cast_member> ?e_3 . ?e_3 <pred:name> "Cary Elwes" . ?e_2 <pred:name> "David E. Kelley" . ?e_1 ?p ?e_2 .  }
Answer: screenwriter