Re: Combining data in different rows?

From: btober(at)ct(dot)metrocast(dot)net
To: Anthony Masinton <amasinton(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Combining data in different rows?
Date: 2007-01-02 20:53:32
Message-ID: 459AC64C.9040509@ct.metrocast.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Bruno Wolff III wrote:
> On Tue, Jan 02, 2007 at 12:33:14 -0700,
> Anthony Masinton <amasinton(at)gmail(dot)com> wrote:
>
>> I would like to combine data from different rows in one column into
>> one row.
>>
>> ...
>>
>> Is this possible and if so, how?
>>
>
> Collapsing rows is done with aggregate functions. You can write a custom
> aggregate that collapses the wills for a particular city. How you do this
> depends on how you want to store the combined wills (e.g. array, text string).
>

Check out the User Comments section at
"http://www.postgresql.org/docs/8.0/interactive/sql-createaggregate.html"

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ben 2007-01-02 23:07:27 Re: Geographical redundancy
Previous Message Bruno Wolff III 2007-01-02 20:41:50 Re: Combining data in different rows?