alexbancheva

Task8_Available Mechanics_Exam_27June2020

Feb 10th, 2021
609
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- Task 8 Available Mechanics
  2. SELECT CONCAT(m.FirstName, ' ', m.LastName) AS Available
  3.     FROM Mechanics AS m
  4.     LEFT JOIN Jobs AS j ON j.MechanicId = m.MechanicId
  5.     WHERE j.[Status] LIKE 'Finished' OR j.[Status] IS NULL
  6.     GROUP BY m.MechanicId, m.FirstName, m.LastName
  7.     ORDER BY m.MechanicId ASC
RAW Paste Data