Question: Which television show's theme music composer is Gary Portnoy and subsequent work is Frasier?
SPARQL query: SELECT DISTINCT ?uri WHERE {?uri <http://dbpedia.org/property/themeMusicComposer> <http://dbpedia.org/resource/Gary_Portnoy> . ?uri <http://dbpedia.org/ontology/subsequentWork> <http://dbpedia.org/resource/Frasier>  . ?uri <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://dbpedia.org/ontology/TelevisionShow>}
Answer: [Cheers] is the television show whose theme music was composed by Gary Portnoy and has Frasier as a subsequent work.