Express the following query in SQL using no subqueries and no set operations.
SELECT idFROM studentEXCEPTSELECT s_idFROM advisor WHERE i_id IS NOT NULL
The above query is going to get the ids of students that don’t have an advisor.
That means, those students that have ids that don’t appear in the advisor relation or
their advisor’s id is set to null.
SELECT s.idFROM student s LEFT OUTER JOIN advisor a ON s.id = a.s_idWHERE a.i_id IS NULL OR a.s_id IS NULL;
Note that we are assuming, the primary key of advisor to be s_id. That is each student
can have at most one advisor.