mysql分组取前几条记录
第一种方法SELECT id, title, channel, create_timeFROM test_news AS aWHERE ( SELECT count(1) FROM test_news AS b WHERE a.channel = b.channel AND a. STATUS = b. STATUS AND a.id < b.id ) < 5ORDER BY a.channel ASC, a.id DESC;第二种方法SELECT a.id, a.titl.








