From: dima <_pppp@mail.ru>
To: Albrecht Berger <berger1517@gmx.ch>
Cc: pgsql <pgsql-sql@postgresql.org>
Subject: Re: sql group by statement
Date: Fri, 13 Sep 2002 14:33:59 +0400
Message-ID: <3D81BF17.4030609@mail.ru> (raw)
References: <002f01c25b10$6db4b940$a07ba8c0@wxp>
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.
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, berger1517@gmx.ch
Subject: Re: sql group by statement
In-Reply-To: <3D81BF17.4030609@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