Re: [SQL] the best way to get the topest 3 record in every group

2002-09-09 Thread Masaru Sugawara
On Mon, 9 Sep 2002 18:08:21 +1000 "jack" <[EMAIL PROTECTED]> wrote: > Dima > My question is that I want to produce ALL the lastest 3 records for EACH > itemNo and supplier. > > Jack I often use the next query for ranking, which is equivalent to Oracle's PARTITION BY(). It isn't influenced by

Re: [SQL] the best way to get the topest 3 record in every group

2002-09-09 Thread Viacheslav N Tararin
> >Cc: <[EMAIL PROTECTED]> >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 >>

Re: [SQL] the best way to get the topest 3 record in every group

2002-09-09 Thread Viacheslav N Tararin
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

Re: [SQL] the best way to get the topest 3 record in every group

2002-09-09 Thread Viacheslav N Tararin
<[EMAIL PROTECTED]> >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 >>

Re: [SQL] the best way to get the topest 3 record in every group

2002-09-09 Thread jack
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 l

Re: [SQL] the best way to get the topest 3 record in every group

2002-09-08 Thread dima
> 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 ??? -

[SQL] the best way to get the topest 3 record in every group

2002-09-08 Thread jack
Hi, 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. jack ---(end of broadcast)--- TIP 4: Don't 'kill -9' th