what is the {character role} for {Home and Away} has {cast member} as {Kate Ritchie} ?
Give me the name of the character played by Kate Ritchie in Home and Away.
What is the character played by cast member Kate Ritchie in Home and Away?
SELECT ?v WHERE { ?h property:character_role ?v . resource:Home_and_Away property:cast_member ?h . ?h property:cast_member resource:Kate_Ritchie }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q1324189> .
?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/Q1797489> .
?statement <http://www.wikidata.org/entity/P453> ?value. 
} 

SELECT ?value WHERE { wd:Q1324189 p:P161 ?s . ?s ps:P161 wd:Q1797489 . ?s pq:P453 ?value}