what is the {character role} for {Grey's Anatomy} has {cast member} as {Kate Walsh} ?
Which profession does Kate Walsh's character have in Grey's Anatomy?
What is the character role of Kate Walsh in Grey's Anatomy?
SELECT ?h WHERE { ?x property:cast_member resource:Kate_Walsh . resource:Grey's_Anatomy property:cast_member ?x . ?x property:character_role ?h }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q438406> .
?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/Q229979> .
?statement <http://www.wikidata.org/entity/P453> ?value. 
} 

SELECT ?value WHERE { wd:Q438406 p:P161 ?s . ?s ps:P161 wd:Q229979 . ?s pq:P453 ?value}