Advertisement
dragonbs

Employees Summary

Sep 28th, 2023
1,481
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.34 KB | None | 0 0
  1. SELECT TOP(50)
  2.             e.[EmployeeID],
  3.             e.[FirstName] + ' ' + e.[LastName] AS [EmployeeName],
  4.             em.[FirstName] + ' ' + em.[LastName] AS [ManagerName],
  5.             d.[Name] AS [DepartmentName]
  6. FROM [Employees] e
  7. JOIN [Employees] em ON e.[ManagerID] = em.[EmployeeID]
  8. JOIN [Departments] d ON d.[DepartmentID] = e.[DepartmentID]
  9. ORDER BY e.[EmployeeID]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement