题解 | #给出employees表中排名为奇数行的first_name#

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

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

/*  先找到 排序后 行数是奇数的 first_name ,再将其作为查询条件 查询*/

select
first_name
from
employees
where
first_name in
(
select
first_name
from
(
select
first_name,ROW_NUMBER() OVER (order by first_name) as row_num
from
employees
) a
where
a.row_num&1 = 1
)





全部评论

相关推荐

07-15 16:52
已编辑
门头沟学院 Java
周五投的,流程今天结束
投递地平线等公司7个岗位
点赞 评论 收藏
分享
求offer的大角牛:简历写的第一乱,没有突出重点,第二项目太多太杂看不出来有啥核心技术,第三自我评价太多了,第四获得的荣誉没啥含金量,可以不写,反正问题不少
点赞 评论 收藏
分享
07-16 19:23
门头沟学院 Java
仁者伍敌:专业技能好多,好强
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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