Re: sql group by statement

Поиск
Список
Период
Сортировка
От dima
Тема Re: sql group by statement
Дата
Msg-id 3D81BF17.4030609@mail.ru
обсуждение исходный текст
Ответ на sql group by statement  ("Albrecht Berger" <berger1517@gmx.ch>)
Список pgsql-sql
see the yesterday's thread about DISTINCT ON (non-standard Postgres feature)

> I have a problem, which I'm not able to solve with a simple query :
> 
> I need a resultset with distinct id's, but the max val2 of each id.
> I tried to group by id, but though I need the pk in my resultset
> I have to group it too, which "destroys" the group of val2.





В списке pgsql-sql по дате отправления:

Предыдущее
От: "Albrecht Berger"
Дата:
Сообщение: sql group by statement
Следующее
От: "Albrecht Berger"
Дата:
Сообщение: Re: sql group by statement