查询 每个班级英语成绩最高的前两名的记录
原文: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://www.cnblogs.com/sanhao/p/11479862.html
时间: 2024-10-01 05:41:02