34,590
社区成员
发帖
与我相关
我的任务
分享
--> 不止两列
select * from 表 a where 日期 = (select max(日期) from 表 where 编号=a.编号)
--> 两列
select 编号,日期=max(日期) from 表 group by 编号
select * from tb t
where not exists(
select 1 from tb where 编号=t.编号 and 日期<t.日期
)