• 问题:不理解为啥按照名连接,为啥不按主键连接,。。。。
  • 坑:不按照排序规则来输出结果
with t1 as(
select * ,
    ROW_NUMBER() over(order by first_name) as rank_1
from employees
)
SELECT e.first_name FROM employees as e
join t1 on  e.first_name =t1.first_name 
where rank_1 % 2 =1;