查询 每个班级英语成绩最高的前两名的记录

原文:https://www.cnblogs.com/hxfcodelife/p/10226934.html

select a.Classid,a.English from
(select Classid,English,row_number() over(partition by Classid order by English desc) as n
from CJ) a
where n<=2

另外一种情况:取组内最新的数据
select max(create_time),order_id from ycej_loan_info where order_id <> '' group by order_id

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-25
  • 2022-12-23
  • 2021-07-28
  • 2021-07-25
  • 2022-01-12
猜你喜欢
  • 2021-12-18
  • 2021-12-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-08
相关资源
相似解决方案