题解 | #distinct 和 desc 关键字的使用#

找出所有员工当前薪水salary情况

https://www.nowcoder.com/practice/ae51e6d057c94f6d891735a48d1c2397

select distinct salary
from salaries
order by salary desc

本题关键在于通过 distinct 对相同薪水进行去重,并在 order by 时使用 desc 指定逆序即可。

全部评论

相关推荐

10-10 01:10
已编辑
深圳大学 测试开发
牛客26692713...:项目经历写那么多没啥用吧,挑两个最好的,其实浓缩成一页会比较好吧,背景、实习、项目,要是还有空间就再加个专业技能
投了多少份简历才上岸
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务