海底暴风雪

富在术数不在劳身,利在局势不在力耕

sql数据去重

sql数据去重最主要的就是找到重复数据,通过group by 重复的数据列,找到id最大或id最小的数据,然后在外面反向查询

select *from people_path where vehicle_id not in (select min(id) from people_path where vehicle_id = 248330 and date(ctime)="2023-10-07" group by speed,lng,lat) and vehicle_id = 248330 and date(ctime)="2023-10-07"

搜索

文章分类