Hi, ive have made an sql query which has a nested query -

select distinct FamilyName, FirstNames
from student as s, course as c, enrollments as e
where c.Dept = 'Math' and c.Points = 10
and s.IdNum = e.IdNum and e.Dept = c.Dept
and e.Year = 2003 and
e.IdNum in (select IdNum from enrollments as e
where e.Dept = 'COMP' and e.Code = '319' and e.Year = 2003 and e.Semester = 'B')

I am stuck on how to write an relational algebra expression for the following query. I know how to write R A expressions with just one query, but this one has 2 selects in it.

Can someone please help me out. Thanks for any help