Advertisement
Guest User

Untitled

a guest
Apr 16th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.21 KB | None | 0 0
  1. SELECT emploee.[Name]
  2.  
  3. FROM [Employed] as emploee, [Employed] as chief
  4.  
  5. where emploee.Chief_Id = chief.Id
  6.  
  7. group by [chief].Id having AVG([emploee].Salary) < [chief].Salary
  8.  
  9. order by [emploee].[Chief_Id]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement