Re: an aggregate to return max() - 1 value? - Mailing list pgsql-sql

From Pavel Stehule
Subject Re: an aggregate to return max() - 1 value?
Date
Msg-id 162867791003042233u5175ecd4u448cd1ae198e08ce@mail.gmail.com
Whole thread Raw
In response to an aggregate to return max() - 1 value?  (Louis-David Mitterrand <vindex+lists-pgsql-sql@apartia.org>)
List 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@apartia.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@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql
>


pgsql-sql by date:

Previous
From: Greg Stark
Date:
Subject: Re: an aggregate to return max() - 1 value?
Next
From: Dave Clements
Date:
Subject: PostgreSQL Active-Active Configuration