| От | q2005 |
|---|---|
| Тема | the best way to get the first record from each group |
| Дата | |
| Msg-id | 005201c50d76$33dbec00$1400a8c0@jac обсуждение исходный текст |
| Ответы |
Re: the best way to get the first record from each group
Re: the best way to get the first record from each group |
| Список | pgsql-sql |
Hi, Is there any better alternative to get the first record from each group? "subno" is an integer. The record with the smallest subno in each group is the first record in the group. select itemno, measureunit, extaxprice from itmt_purchase where subno in (select min(subno)as subno from itmt_purchase group by itemno order by itemno) order by itemno, measureunit; -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 265.8.6 - Release Date: 07/02/05
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера