On Sat, Jul 24, 2010 at 10:38 AM, Scott Marlowe <scott.marl...@gmail.com> wrote:
> On Sat, Jul 24, 2010 at 12:56 AM, Allan Kamau <kamaual...@gmail.com> wrote:
>> Hi all,
>>
>> I have a large table that contains redundancies as per one field.
>>
>> I am looking for a way to identify (or extract) a non redundant set of
>> rows ( _any_ one record per group) from this table and for each record
>> of this "distinct" set of rows, I would like to capture it's other
>> fields.
>
> Would "Select distinct on ... " work for you?
>
> http://www.postgresql.org/docs/8.4/static/sql-select.html
>
> search the page for "distinct on".
>

Thank you Scott, you have made my day, this is exactly what I was looking for.

Allan.

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to