Re: agregates
От | Jean-Luc Lachance |
---|---|
Тема | Re: agregates |
Дата | |
Msg-id | 3E3056D4.44603C61@nsd.ca обсуждение исходный текст |
Ответ на | Re: agregates (Andrew Sullivan <andrew@libertyrms.info>) |
Ответы |
Re: agregates
|
Список | pgsql-general |
Sure it does! select customersid, paymentid from tblpayment p1 where paymentdebit > 0 and paymentid = ( select paymentid from tblpayment p2 where p2.paymentdebit > 0 and p2.customerid = p1.customerid order by paymentid desc limit 1 offset 1); JLL Andrew Sullivan wrote: > > On Wed, Jan 22, 2003 at 05:15:44PM -0500, Eric B. Ridge wrote: > > > > wouldn't you want LIMIT 2 OFFSET 1 ? > > No, he only wants one record. But actually, he wanted one record per > customer, so my suggestion didn't help. > > A > -- > ---- > Andrew Sullivan 204-4141 Yonge Street > Liberty RMS Toronto, Ontario Canada > <andrew@libertyrms.info> M2P 2A8 > +1 416 646 3304 x110 > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
В списке pgsql-general по дате отправления: