我爱编程

mysql分组取前三

2018-06-21  本文已影响10人  阔阔飞翔

select *

from tb k

where 3>(select count(*) from tb where k.分组字段=分组字段 and 你的排序字段>k.你的排序字段)

上一篇 下一篇

猜你喜欢

热点阅读