题解 | #使用临时表解决#
给出employees表中排名为奇数行的first_name
https://www.nowcoder.com/practice/e3cf1171f6cc426bac85fd4ffa786594
with temp_table as ( SELECT first_name FROM ( SELECT first_name, ROW_NUMBER() OVER (ORDER BY first_name) AS row_num FROM employees ) AS temp WHERE row_num % 2 != 0 ) SELECT first_name from employees where first_name in( SELECT first_name from temp_table)