SELECT student_id , create_time, 需要查询的数据
FROM (
SELECT a.student_id as student_id ,
a.create_time as create_time,
a.需要查询的数据 as 需要查询的数据,
ROW_NUMBER() OVER (PARTITION BY a.student_id ORDER BY create_time DESC) AS rn
FROM student a
)
WHERE rn = 1;
oracle 分组取最新一条数据
最新推荐文章于 2025-06-24 11:13:02 发布