Closed yusufshalaby closed 5 months ago
Modifying the sql to the following fixes the issue:
select
last_value(a ignore nulls) over (
partition by c
order by d
rows between unbounded preceding and unbounded following
) as a,
last_value(b ignore nulls) over (
partition by c
order by d
rows between unbounded preceding and unbounded following
) as b
from some_table
where a = 1
Minimal example with "IGNORE NULLS" included in the window function.
And here it is working without: