查询每个国家下面玩家 金币 最多的3个玩家?
select *
from t_game v
where 3>=(select count(*) from t_game where g_contry=v.g_contry and g_money>=v.g_money)
select *
from t_game v
where 3>=(select count(*) from t_game where g_contry=v.g_contry and g_money>=v.g_money)
from t_game
group by g_contry
版主好酷,非常谢谢!能否说一下你的思路呢?以及这条语句的执行过程?
时候有关于Sql的书籍推荐推荐?
期待您的回复。