标签:https lis class art order by english esc rom create
查询 每个班级英语成绩最高的前两名的记录
原文: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
标签:https lis class art order by english esc rom create
原文地址:https://www.cnblogs.com/sanhao/p/11479862.html