I'm trying to create a query that will display the name of the staff who are not mentoring any other staff. It should also be ordered by the surname.
So far, I've got this:
SELECT a.name, m.mentor
FROM accountant AS a
LEFT OUTER JOIN accountant AS m ON a.mentor = m.staff_id
WHERE m.mentor = NULL
ORDER BY m.surname;
When I run the query it doesn't return any results.
Any help would be nice.