解决方案
40
select id,content,user_id from ( select t1.*, (select count(*) from tb t2 where t1.user_id = t2.user_id and t1.id>=t2.id) rn from tb t1 )t where rn <= 2
40
select id,content,user_id from ( select t1.*, (select count(*) from tb t2 where t1.user_id = t2.user_id and t1.id>=t2.id) rn from tb t1 )t where rn <= 2