以下两个查询之间的区别是什么?双方将返回不同的行:两个分析查询之间的差异
with ordered_table as
(
select * from table order by column1
)
select first_value(column2 ignore nulls) over (partition by column3)
from ordered_table;
和
select first_value(column2 ignore nulls) over (partition by column3 order by column1)
from table;
注:我会尽力提供一个测试用例,但我认为,一个人有明确的不需要的概念。