问答详情
源自:2-2 [MySQL] 如何在子查询中实现多列过滤

为什么要多列(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);

提问者:youmendongsun 2017-03-10 17:18

个回答