Re: nth_value and row_number in a partition
От
David G. Johnston
Тема
Re: nth_value and row_number in a partition
Дата
Msg-id
CAKFQuwa3SCRhpnjOK0=dNxL=vt2Lvrs9VYLhJ8p2UZrUqieShQ@mail.gmail.com
Ответ на
nth_value and row_number in a partition (Olivier Leprêtre)
Список
Дерево обсуждения
nth_value and row_number in a partition Olivier Leprêtre <o.lepretre@gmail.com>
Re: nth_value and row_number in a partition "David G. Johnston" <david.g.johnston@gmail.com>
RE: nth_value and row_number in a partition Olivier Leprêtre <o.lepretre@gmail.com>
Re: nth_value and row_number in a partition "David G. Johnston" <david.g.johnston@gmail.com>
Re: nth_value and row_number in a partition Martin Stöcker <martin.stoecker@stb-datenservice.de>
RE: nth_value and row_number in a partition Olivier Leprêtre <olepretre@maule.fr>
Re: nth_value and row_number in a partition Martin Stöcker <martin.stoecker@stb-datenservice.de>
RE: nth_value and row_number in a partition Olivier Leprêtre <o.lepretre@gmail.com>
Re: nth_value and row_number in a partition "MS (direkt)" <martin.stoecker@stb-datenservice.de>
On Thursday, January 25, 2018, Olivier Leprêtre <o.lepretre@gmail.com> wrote:
nth_value(integer, bigint) doesn't exists.
This is close, you just need to cast to integer.
(cast(
row_number() as integer) over (partition by roads,segments order by orders)))
You cannot separate the window function from its over clause.
Cast( Row_number() over (...) as integer )
Not tested...and I tend to use :: instead of cast
David J.
В списке pgsql-sql по дате отправления