CREATE TABLE teachers (lastname VARCHAR2, classroom VARCHAR2)
CREATE TABLE list (classroom VARCHAR2)

Find the last names of the teachers that teach fifth grade.
SELECT DISTINCT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 5
SELECT DISTINCT "T2"."lastname" FROM "list" "T1" JOIN "teachers" "T2" ON "T1"."classroom" = "T2"."classroom" WHERE "grade" = 5