I need to write a query that pulls only employees who are missing their degrees entered into our ERP system. For example, we have a table where their degrees are listed.
Employee ID FName LName Degree
100 John Smith BA
200 Bill Jones BS
300 Alice Waters BA
300 Alice Waters MA
400 Joe Lewis MA
They would like me to pull from this table, only Joe Lewis because he doesn't have a bachelors degree entered in the system, but since he has a master's degree, the assumption is he also has a bachelor's, and someone just missed entering it into the system.
I've tried using EXCEPT filtering on Bachelors degrees, however, that still yields
Employee ID FName LName Degree
300 Alice Waters MA
400 Joe Lewis MA
And I don't want Alice in the list because she has a bachelors degree coded into the system.
Any thoughts on how I might approach this would be much appreciated.
sql-server-2014. Differences in syntax and features often affect the answers. Note thattsqlnarrows the choices, but does not specify the database.