On Monday, November 4, 2024, Guyren Howe <guyren(at)gmail(dot)com> wrote:
> Wouldn’t it be offset 4_999_999?
>
Probably. I tend to expect off-by-one for these kinds of things and test
my way out.
>
> I’d still like to understand why nth_value doesn’t work.
>
When you perform an order by in a window clause the frame you get by
default ends at the current row. Consider “count(*) over ()” versus
“count(*) over (order by id)”.
You need to not use defaults for the window frame if this doesn’t suit you.
David J.