查询username,根据fundcode分组,按照date倒序,取date最大的一条数据

select * from ( 
select username, row_number() over(partition by fundcode, order by date desc) rn 
from usertable
) t where t.rn <=1

 

 

 

-----------------------------------------------------------------------------

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-24
  • 2021-12-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-02
  • 2022-02-22
  • 2022-01-10
  • 2021-08-30
  • 2022-12-23
  • 2021-06-10
  • 2021-05-25
相关资源
相似解决方案