Re: the best way to get the topest 3 record in every group
| От | jack |
|---|---|
| Тема | Re: the best way to get the topest 3 record in every group |
| Дата | |
| Msg-id | 000701c257d8$1163c9a0$1400a8c0@jac обсуждение исходный текст |
| Ответ на | the best way to get the topest 3 record in every group ("jack" <datactrl@tpg.com.au>) |
| Ответы |
Re: the best way to get the topest 3 record in every group
|
| Список | pgsql-sql |
Dima My question is that I want to produce ALL the lastest 3 records for EACH itemNo and supplier. Jack ----- Original Message ----- From: "dima" <_pppp@mail.ru> To: "jack" <datactrl@tpg.com.au> Cc: <pgsql-sql@postgresql.org> Sent: Monday, September 09, 2002 4:34 PM Subject: Re: [SQL] the best way to get the topest 3 record in every group > > There is a table like : > > << > > itemNo > > supplier > > purchaseDate > > Price > > Qty > > << > > Please provide an idea if I want to get the latest 3 puchase records for > > each item and supplier. Thank you in advance. > select * from table_name where supplier=value order by purchaseDate desc > limit 3 > ??? > >
В списке pgsql-sql по дате отправления: