I am guessing there is a mistake in the nested query however I cannot seem to find it myself. Here is the query:
Select student.sid, name
from student join exam on exam.sid = student.sid
where student.sid in (select *
from course join exam on cid=courseid
group by exam.sid
having sum(credits) >= 20)
Thank you in advance!
question from:https://stackoverflow.com/questions/65643332/where-is-the-error-in-my-nested-mysql-query