Which are the diferrences between the following two queries? Both returns different rows:
with ordered_table as
(
select * from table order by column1
)
select first_value(column2 ignore nulls) over (partition by column3)
from ordered_table;
and
select first_value(column2 ignore nulls) over (partition by column3 order by column1)
from table;
Note: I'll try to provide a test-case but I think that for someone having the concepts clear is not needed.