Re: Calculating product from rows - (aggregate product )

From: Dennis Brakhane <brakhane(at)googlemail(dot)com>
To: Jasen Betts <jasen(at)xnet(dot)co(dot)nz>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Calculating product from rows - (aggregate product )
Date: 2009-05-04 21:28:49
Message-ID: 226a19190905041428o15959589j3974226ad2420f46@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, May 4, 2009 at 12:53 PM, Jasen Betts <jasen(at)xnet(dot)co(dot)nz> wrote:
> select exp(sum(ln( thiscolumn ))) from foo;

Keep in mind that it won't work when the table containts negative
numbers, though (or zeros, but since in this case the product is also
zero, it doesn't matter)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2009-05-04 22:04:42 Re: Calculating product from rows - (aggregate product )
Previous Message Adam Ruth 2009-05-04 20:55:12 uuid data type and ODBC