Re: Selecting exactly one row for each column value - Mailing list pgsql-sql

From Florian Weimer
Subject Re: Selecting exactly one row for each column value
Date
Msg-id 82tzwy2x4a.fsf@mid.bfk.de
Whole thread Raw
In response to Re: Selecting exactly one row for each column value  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
* Tom Lane:

> Florian Weimer <fweimer@bfk.de> writes:
>> For each value in the first column, I need one (and only one) matching
>> row from the table.  A possible solution is:
>
> SELECT DISTINCT ON would do it, if you don't mind a non-portable solution.

Cool, thanks a lot.

--
Florian Weimer                <fweimer@bfk.de>
BFK edv-consulting GmbH       http://www.bfk.de/
Kriegsstraße 100              tel: +49-721-96201-1
D-76133 Karlsruhe             fax: +49-721-96201-99


pgsql-sql by date:

Previous
From: "Rodrigo De León"
Date:
Subject: Re: Time of executed query
Next
From: Andrew Sullivan
Date:
Subject: Re: [Fwd: View Vs. Table]