Advertisement
dragonbs

Employees With Project

Sep 28th, 2023
977
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.27 KB | None | 0 0
  1. SELECT TOP(5) e.[EmployeeID], e.[FirstName], p.[Name]
  2. FROM [Employees] e
  3. JOIN [EmployeesProjects] ep ON e.[EmployeeID] = ep.[EmployeeID]
  4. JOIN [Projects] p ON ep.[ProjectID] = p.[ProjectID]
  5. WHERE p.[StartDate] > '2002-08-13' AND p.[EndDate] IS NULL
  6. ORDER BY e.[EmployeeID]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement