Re: agregates

From: Andrew Sullivan <andrew(at)libertyrms(dot)info>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: agregates
Date: 2003-01-22 19:28:55
Message-ID: 20030122142855.H31287@mail.libertyrms.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)libertyrms(dot)info> M2P 2A8
+1 416 646 3304 x110

In response to

  • agregates at 2003-01-22 17:07:06 from David Blood

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mike Mascari 2003-01-22 19:44:19 Re: Odd subselect in target list behavior WRT aggregation
Previous Message Ed L. 2003-01-22 19:10:17 7.2.1 clients + 7.2.3 server?