对分组取最大值语句的疑惑??

ShineLC ShineLC 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
Select * from T4 a where not exists
(Select * From T4 where email=a.email and score>a.score)

这个语句是求以email分组后中的score最大值~`看不太明白,请达人讲解一下,谢谢!

和下面这句为什么会不同呢?

Select * from T4 where not exists
(Select 1 From T4 a,T4 b where a.email=b.email and b.score>a.score)
...全文

相关推荐

评论 14
收藏 已收藏
分享
返回顶部
ShineLC
MS-SQL Server 34,876 成员 254,635 内容