17,082
社区成员
发帖
与我相关
我的任务
分享
select id,x,y,device_id,locate_time
from(select id,x,y,device_id,locate_time,row_number()over(partition by device_id order by locate_time desc) rn
from device_position
where build_id = '862300010010300012'
and floor = 'f1'
)
where rn = 1
select distinct id, x,y,device_id, max(locate_time)over(partition by device_id) locate_time
from device_position
where build_id = '862300010010300012'
and floor = 'f1' ;
select id, x,y,device_id, max(locate_time)over(partition by device_id) locate_time
from device_position
where build_id = '862300010010300012'
and floor = 'f1' ;