📅  最后修改于: 2022-03-11 15:05:23.384000             🧑  作者: Mango
SELECT
s.last_name, s.first_name,
p.course_code, p.status, p.amount
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;