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

Поиск
Список
Период
Сортировка
От dima
Тема Re: the best way to get the topest 3 record in every group
Дата
Msg-id 3D7C4108.70407@mail.ru
обсуждение исходный текст
Ответ на the best way to get the topest 3 record in every group  ("jack" <datactrl@tpg.com.au>)
Список pgsql-sql
> 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 по дате отправления:

Предыдущее
От: "jack"
Дата:
Сообщение: 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