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!