SELECT s.last_name, s.first_name, FROM enrollment e JOIN student s ON s.id=e.student_id JOIN payment p ON p.course_code=e.course_code AND p.student_id=e.student_id;