CREATE TABLE enroll (stu_num VARCHAR2, enroll_grade VARCHAR2, class_code VARCHAR2)
CREATE TABLE student (stu_lname VARCHAR2, stu_num VARCHAR2)

What is the last name of the student who got a grade A in the class with code 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
SELECT "T1"."stu_lname" FROM "student" "T1" JOIN "enroll" "T2" ON "T1"."stu_num" = "T2"."stu_num" AND "T2"."class_code" = 10018 AND "T2"."enroll_grade" = 'A'