what segment of a tv show episode did jim margolis write?
Entity
m.0125hnw3
Are You Decent?
class entity
tv.tv_episode_segment m.05bn_cx
tv.tv_episode_segment tv.tv_writer
TV episode segment Jim Margolis
none none
tv.tv_episode_segment.writer
Writer
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 :tv.tv_episode_segment . 
VALUES ?x1 { :m.05bn_cx } 
?x0 :tv.tv_episode_segment.writer ?x1 . 
FILTER ( ?x0 != ?x1  )
}
}
(AND tv.tv_episode_segment (JOIN tv.tv_episode_segment.writer m.05bn_cx))