I'm working in Oracle SQL Developer right now and am stumped on a query. The prompt reads:
Provide an alphabetic listing of instructors who have never taught a course section.
List the salutation, first name, last name and zip code.
This is my current attempt:
SELECT i.Salutation, i.First_Name, i.Last_Name, i.Zip
FROM Instructor i
JOIN Section s
ON i.Instructor_Id = s.Instructor_Id
WHERE 0 in (SELECT COUNT(Instructor_Id)
FROM Section
GROUP BY Instructor_Id)
My code works (returns desired output for the instructors) when I search for instructors who actually have classes, but it doesn't recognize when I search for those with none. I'm not too sure how to workaround this, any help is appreciated.