Search Postgresql Archives

Re: nth_value out of more than n values returns null

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday, November 4, 2024, Guyren Howe <guyren@xxxxxxxxx> 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.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux