oracle中sql案例

1.从众多事物中查询每个事物的最新时间的记录。

select c.vin,c.checktime
from (select t.*,
row_number() over(partition by t.vin order by t.checktime desc) rn
from test_table t
where t.vin is not null) c
where rn = 1;

上一篇:oracle 学习笔记1


下一篇:oracle分页计算公式