Question: What is the connection between John Williams (the one that has the occupation of barrister) to lawyer?
Choices: foundational text
religious order
season starts
place of publication
make-up artist
model item
occupation
place of origin (Switzerland)
location
Wikidata property
SPARQL: SELECT DISTINCT ?p WHERE { ?e_1 <pred:name> "John Williams" . ?e_1 <occupation> ?e_3 . ?e_3 <pred:name> "barrister" . ?e_2 <pred:name> "lawyer" . ?e_1 ?p ?e_2 .  }
Program:
function: Find
inputs: barrister
function: Relate
dependencies: 0
inputs: occupation
backward
function: Find
inputs: John Williams
function: And
dependencies: 1
2
function: Find
inputs: lawyer
function: QueryRelation
dependencies: 3
4
Answer: occupation