-- courses that Bart and Lisa both took -- select distinct c.name from students s join grades g on g.student_id = s.id join courses c on c.id = g.course_id join grades g2 on g2.course_id = g.course_id join students s2 on s2.id = g2.student_id where s.name = "Bart" and s2.name = "Lisa"; -- names of all teachers Bart has had -- select t.name, c.name from students s join grades g on g.student_id = s.id join courses c on c.id = g.course_id join teachers t on t.id = c.teacher_id where s.name = "Bart";