Re: sql group by statement

From: dima <_pppp(at)mail(dot)ru>
To: Albrecht Berger <berger1517(at)gmx(dot)ch>
Cc: pgsql <pgsql-sql(at)postgresql(dot)org>
Subject: Re: sql group by statement
Date: 2002-09-13 10:33:59
Message-ID: 3D81BF17.4030609@mail.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Albrecht Berger 2002-09-13 10:39:46 Re: sql group by statement
Previous Message Albrecht Berger 2002-09-13 10:29:21 sql group by statement