Re: an aggregate to return max() - 1 value?

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: an aggregate to return max() - 1 value?
Date: 2010-03-05 06:33:01
Message-ID: 162867791003042233u5175ecd4u448cd1ae198e08ce@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello

select min(x) from (select x from data order by x desc limit 2) s;

Pavel

2010/3/4 Louis-David Mitterrand <vindex+lists-pgsql-sql(at)apartia(dot)org>:
> Hi,
>
> With builtin aggregates is it possible to return the value just before
> max(col)?
>
> Thanks,
>
> --
> Sent via pgsql-sql mailing list (pgsql-sql(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql
>

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Dave Clements 2010-03-05 07:25:24 PostgreSQL Active-Active Configuration
Previous Message Greg Stark 2010-03-04 20:53:10 Re: an aggregate to return max() - 1 value?