SELECT DISTINCT ?uri WHERE {?uri <http://dbpedia.org/ontology/subsequentWork> <http://dbpedia.org/resource/Frasier> . ?uri <http://dbpedia.org/ontology/openingTheme> <http://dbpedia.org/resource/Gary_Portnoy> . ?uri <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://dbpedia.org/ontology/TelevisionShow>}
Which television show is the subsequent work of Frasier and the opening theme is Gary Portnoy?
SELECT DISTINCT ?i WHERE { ?i property:subsequent_work resource:Frasier . ?i property:opening_theme resource:Gary_Portnoy . ?i rdf:type ontology:Television_Show }
Cheers
[Cheers] is the television show whose subsequent work is Frasier and opening theme is Gary Portnoy.
[Cheers] is a television show that continues with Hassier and whose opening theme is Gary Portnoy.
[Cheers] is the television show whose subsequent work is Frasier and opening theme is the person.
[Prada] is a TV show whose follow-up work is Frasier and opening theme is done by the person.