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

From: Rob Sargent <robjsargent(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: an aggregate to return max() - 1 value?
Date: 2010-03-04 20:20:23
Message-ID: 4B901607.2090409@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

'select max(col) where col < max(col)' should work but you have to do
'where col < (select max(col) '

On 03/04/2010 01:09 PM, Louis-David Mitterrand wrote:
> Hi,
>
> With builtin aggregates is it possible to return the value just before
> max(col)?
>
> Thanks,
>

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Greg Stark 2010-03-04 20:53:10 Re: an aggregate to return max() - 1 value?
Previous Message Gerardo Herzig 2010-03-04 20:14:00 Re: an aggregate to return max() - 1 value?