分组求最大日期,该怎么解决

分组求最大日期按客户编号分组取最大时间[解决办法]select *from(select row_number()over(partition by

分组求最大日期
按客户编号分组取最大时间

[解决办法]
select *from(select row_number()over(partition by 客户编号 order by 日期) as number,* from table)a where number=1
[解决办法]
select *from table a where 日期=(select max(date) from table b where a.id=b.id)