为什么要多列(b.user_id, b.kills)?只用过滤b.kills就可以了呀?
SELECT a.user_name, b.timestr, b.kills FROM user1 a JOIN user_kills b ON a.id = b.user_id WHERE b.kills IN (SELECT MAX(kills) cnt FROM user_kills GROUP BY user_id);
SELECT a.user_name, b.timestr, b.kills FROM user1 a JOIN user_kills b ON a.id = b.user_id WHERE b.kills IN (SELECT MAX(kills) cnt FROM user_kills GROUP BY user_id);
2017-03-10
举报