sql - Comparing Supervisor's Salaries -


I am trying to show employees who help at least 25% of their supervisors. So far, I have a code that can show myself to the supervisors, but I'm not sure how to "hold" supervisor salaries:

  SELECT TOP (100) PERCENT Firstname + '' * Employee, id, jubilate AS [Job title] as the last name, Straw (round (pay / 12, 2), 12, 2) AS [Monthly Salary] from the employable WHERE (in the id ( Negative WHERE from the Selection Supervisor (not Supervisor)) Last name by order, First name   

- First of all, search for employees and supervisors

  Emp.id, emp.Salary, Sup.SuperVisor, joining Sup.Salary employeetable emp employeetable emp.supervisor = Sup.id   

 < Code> where emp.Salary & gt; = .25 * sup.Salary   

To eliminate those people where there are supervisors

  and not emp.id (select different supervisor from employeetable Do)    

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -