This answer quotes ChatGPT
Your query statement is incorrect. The correct SQL query statement is
.SELECT student.sname, student.class
FROM student
WHERE student.sno NOT IN (
SELECT elective.sno
FROM elective
WHERE elective.cno = 'C06'
);
This query uses a subquery to find the number of a student taking course C06 on elective relational table Elective table, and then finds a student name and class that does not appear in this subquery result in Student relational table Student.