From: dima <_pppp@mail.ru>
To: jack <datactrl@tpg.com.au>
Cc: pgsql-sql@postgresql.org
Subject: Re: the best way to get the topest 3 record in every group
Date: Mon, 09 Sep 2002 10:34:48 +0400
Message-ID: <3D7C4108.70407@mail.ru> (raw)
References: <002201c25796$d923d3f0$1400a8c0@jac>
> 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
???
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: _pppp@mail.ru, datactrl@tpg.com.au
Subject: Re: the best way to get the topest 3 record in every group
In-Reply-To: <3D7C4108.70407@mail.ru>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox