答案 0 :(得分:1)
select s1.* from student s1
inner join
(
select student_id,max(semester) as semester
from student group by student_id
) as s2
on s1.student_id=s2.student_id and s1.semester=s2.semester
答案 1 :(得分:1)
SELECT *
FROM STUDENT_SCORE
GROUP BY student_id
HAVING MAX(score)
注意:如果您需要将ID重命名为stnd_tbl_nd
,则可以使用AS
关键字在投影之前或之后执行此操作。