首页 > 数据库技术 > 详细

oracle中sql案例

时间:2020-01-16 11:27:44      阅读:66      评论:0      收藏:0      [点我收藏+]

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中sql案例

原文:https://www.cnblogs.com/AWNUygah/p/12199772.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!