I currently am stuck on this question:
Display badge details for those employees who are not sales representatives. The format of the badge details is the first letter of the first name followed by a period, then the last name and then the title in upper case and enclosed in parentheses e.g.
A. Fuller (VICE PRESIDENT, SALES)
Here is what I have so far:
SELECT FirstName, LastName,
CONCAT(SUBSTRING(FirstName, 1, 1),
) as 'Badge Details'
N.Davolio SALES REPRESENTATIVE
A.Fuller VICE PRESIDENT, SALES
J.Leverling SALES REPRESENTATIVE
M.Peacock SALES REPRESENTATIVE
S.Buchanan SALES MANAGER
M.Suyama SALES REPRESENTATIVE
R.King SALES REPRESENTATIVE
L.Callahan INSIDE SALES COORDINATOR
A.Dodsworth SALES REPRESENTATIVE
Assuming you can identify sales reps as having the title
SALES REPRESENTATIVE, and also assuming that each employee can have only one role, then you should be able to just add a
WHERE clause which removes the sales reps:
SELECT FirstName, LastName, CONCAT(SUBSTRING(FirstName, 1, 1), '.', LastName, ' ', '(', UPPER(title), ')' ) AS `Badge Details` FROM Employees WHERE UPPER(title) <> 'SALES REPRESENTATIVE'