SELECT DISTINCT ?uri WHERE {?uri <http://dbpedia.org/ontology/subsequentWork> <http://dbpedia.org/resource/Frasier> . ?uri <http://dbpedia.org/ontology/location> <http://dbpedia.org/resource/Massachusetts> . ?uri <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://dbpedia.org/ontology/TelevisionShow>}
Which TV show's setting is in Massachusetts and is the subsequent work of Fraiser ?
SELECT DISTINCT ?s WHERE { ?s property:location resource:Massachusetts . ?s rdf:type ontology:Television_Show . ?s property:subsequent_work resource:Frasier }
Cheers
The television show whose subsequent work is Frasier and location in Massachusetts is [Cheers].
[Cheers] setting is in Massachusetts and is the subsequent work of Fraiser.