Re: agregates - Mailing list pgsql-general

From Andrew Sullivan
Subject Re: agregates
Date
Msg-id 20030122142855.H31287@mail.libertyrms.com
Whole thread Raw
In response to agregates  ("David Blood" <david@matraex.com>)
Responses Re: agregates
List pgsql-general
On Wed, Jan 22, 2003 at 10:07:06AM -0700, David Blood wrote:
>
> is there a better way to get the max - 1?

You could try ORDER BY paymentid DESC LIMIT 1 OFFSET 1.  That'll give
you the second from the top of the list, according to the order you
used.

A

--
----
Andrew Sullivan                         204-4141 Yonge Street
Liberty RMS                           Toronto, Ontario Canada
<andrew@libertyrms.info>                              M2P 2A8
                                         +1 416 646 3304 x110


pgsql-general by date:

Previous
From: "Ed L."
Date:
Subject: 7.2.1 clients + 7.2.3 server?
Next
From: "Mike Mascari"
Date:
Subject: Re: Odd subselect in target list behavior WRT aggregation