MySQL每个分类的前几条记录
时间:2021-07-01 10:21:17
帮助过:37人阅读
<= B.InsertDate
GROUP BY A.Category,A.InsertDate
HAVING COUNT(B.InsertDate) <= @N
) AS B1
ON A1.Category = B1.Category
AND A1.InsertDate = B1.InsertDate
ORDER BY A1.Category,A1.InsertDate DESC
ps: @N 就是要取多少条
MySQL每个分类的前几条记录
标签:art article 分类 count contain 组成 color code pre