求每个分组中的前N条记录在LeetCode中的数据库题目中已经是难度为Hard级别了,可以参考我的博客实现:http://blog.csdn.net/wzy_1988/article/details/52871636
2016-10-23
我用自己写的也可以查出来
select a.name,b.kill_date,MAX(b.kill_num) max_kill
from `user` a join `kill` b ON a.id=b.user_id
GROUP BY a.name;
select a.name,b.kill_date,MAX(b.kill_num) max_kill
from `user` a join `kill` b ON a.id=b.user_id
GROUP BY a.name;
2016-09-29