题解 | #对于employees表中,给出奇数行的first_name#
对于employees表中,给出奇数行的first_name
http://www.nowcoder.com/practice/e3cf1171f6cc426bac85fd4ffa786594
结果无需排序
的意思是不允许排序...只能用原来的表来join了
select e.first_name from employees e left join (select first_name, rank() over(order by first_name asc) as rn from employees) tmp on e.first_name = tmp.first_name where rn%2=1;