题解 | #给出employees表中排名#

给出employees表中排名为奇数行的first_name

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

select a.first_name
from (
    select emp_no,first_name, row_number() over(order by first_name) row_num_
    from employees
) a
where a.row_num_%2=1
order by a.emp_no
  • 考察窗口函数
  • 按照原来的顺序输出,可以通过order by emp_no
全部评论

相关推荐

酷酷的喜马拉雅山:感觉这比一直在初筛不动的好多了
点赞 评论 收藏
分享
评论
2
收藏
分享

创作者周榜

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