select t1.id,t1.name
  from
(
   select 
      t.id
      ,t.name
      ,row_number()over(partition by t.id order by t.date) rn
     from A t
) t1
  where t1.rn<=10;



结果如下:

 

 

posted on 2023-04-13 16:27  茫无所知  阅读(66)  评论(0编辑  收藏  举报