mysql,求每组前N条记录
摘要:
直接上代码 select name, subject, score from( select (@i:=case when @subject_pre=t1.subject then @i+1 else 1 end) as rn, t1.name, t1.subject, t1.score, (@su 阅读全文
posted @ 2023-06-27 16:35 sddhome 阅读(21) 评论(0) 推荐(0) 编辑