What are the last names of all students?
select stu_lname from student
Which of those refer to students who received a grade of A in some classes?
select t1.stu_lname from student as t1 join enroll as t2 on t1.stu_num = t2.stu_num where t2.enroll_grade = 'A'
Of those, who is enrolled in 10018?
select t1.stu_lname from student as t1 join enroll as t2 on t1.stu_num = t2.stu_num where t2.enroll_grade = 'A' and t2.class_code = 10018