有两行的最高值为 5,但下面的查询只返回最后一个最高记录......我怎样才能获得成员值最高的所有行?
我可以使用 max is where 子句请帮忙吗?
SELECT teamcode,MAX(member) AS members FROM(
SELECT t.`teamcode` AS teamcode,
COUNT(*) AS member
FROM `users` u
JOIN teams t
ON u.teamcode=t.tm_id
GROUP BY `teamcode`
) AS maxcount
如何获得所有最高值?