what is the {object has role} for {Bonanza} has {cast member} as {Dan Blocker} ?
In the movie Bonanza, what role was Dan Blocker cast in?
In which role was Dan Blocker cast for the movie Bonanza?
SELECT ?i WHERE { ?m property:cast_member resource:Dan_Blocker . resource:Bonanza property:cast_member ?m . ?m property:object_has_role ?i }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q862187> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P161> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q962647> .
?statement <http://www.wikidata.org/entity/P3831> ?value. 
} 

SELECT ?value WHERE { wd:Q862187 p:P161 ?s . ?s ps:P161 wd:Q962647 . ?s pq:P3831 ?value}