时间:2021-07-01 10:21:17 帮助过:2人阅读
SELECT tpn.news_id, tpn.title, tpn.news_group_id, tpn.send_date FROM t_pm_news tpn WHERE 3 > ( SELECT COUNT(*) FROM t_pm_news t WHERE tpn.news_group_id = t.news_group_id AND tpn.send_date <= t.send_date )
注:时间相同可能会有误差
MySQL分组查询,前3条数据
标签: