#NEWLINE# def _case_where_correlated_subquery( self ) : #NEWLINE# #INDENT# t1 = self . foo #NEWLINE# t2 = t1 . view ( ) #NEWLINE# stat = t2 [ ( t1 . dept_id == t2 . dept_id ) ] . y . mean ( ) #NEWLINE# return t1 [ ( t1 . y > stat ) ]