what genre of opera does sondheim write for?
Entity Entity
m.01jfsb m.09swn
Thriller Operetta
class class entity
opera.opera_genre opera.opera m.077rj
opera.opera_genre opera.opera music.songwriter
Opera Genre Opera sondheim
none none none
opera.opera_genre.operas_in_this_genre music.composition.lyricist
Operas In This Genre Lyricist
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX : <http://rdf.freebase.com/ns/> 
SELECT (?x0 AS ?value) WHERE {
SELECT DISTINCT ?x0  WHERE { 
?x0 :type.object.type :opera.opera_genre . 
?x1 :type.object.type :opera.opera . 
VALUES ?x2 { :m.077rj } 
?x0 :opera.opera_genre.operas_in_this_genre ?x1 . 
?x1 :music.composition.lyricist ?x2 . 
FILTER ( ?x0 != ?x1 && ?x0 != ?x2 && ?x1 != ?x2  )
}
}
(AND opera.opera_genre (JOIN opera.opera_genre.operas_in_this_genre (JOIN music.composition.lyricist m.077rj)))