Question: Name the TV show whose opening theme is Gary Portnoy and the subsequent work is Frasier?
SPARQL query:
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX res: <http://dbpedia.org/resource/>
PREFIX onto: <http://dbpedia.org/ontology/>
SELECT DISTINCT ?uri WHERE {?uri onto:openingTheme <http://dbpedia.org/resource/Gary_Portnoy> . ?uri onto:subsequentWork <http://dbpedia.org/resource/Frasier> . ?uri rdf:type onto:TelevisionShow}