Re: first_value/last_value
От | Tom Smith |
---|---|
Тема | Re: first_value/last_value |
Дата | |
Msg-id | CAKwSVFH2V6pXiAGNkD7X8LeE9vdhe-zHEuKO+v9nRRREYvfdVQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: first_value/last_value (Adam Brusselback <adambrusselback@gmail.com>) |
Ответы |
Re: first_value/last_value
|
Список | pgsql-general |
I need to use both in single sql.
On Wed, May 18, 2016 at 9:08 PM, Adam Brusselback <adambrusselback@gmail.com> wrote:
Is there a reason you can't do that now with a limit 1/order by/union all?
Just have it ordered one way on the first query and the other on the bottom. That will give you two rows that are the first / last in your set based on whatever column you order on.On May 18, 2016 8:47 PM, "Tom Smith" <tomsmith1989sk@gmail.com> wrote:ThanksI am wondering if 9.7 would make them built-in function like max/minThere is actually a C-extension for first()/last().in single sql without using window features.as non-window function? i.e. enabling getting the first/last rowHello:Is there a plan for 9.7 to enable using the two aggregate function
В списке pgsql-general по дате отправления: