select *
from tb k
where 3>(select count(*) from tb where k.分组字段=分组字段 and 你的排序字段>k.你的排序字段)
select *
from tb k
where 3>(select count(*) from tb where k.分组字段=分组字段 and 你的排序字段>k.你的排序字段)
本文标题:mysql分组取前三
本文链接:https://www.haomeiwen.com/subject/ugnqyftx.html
网友评论