Re: multiple paramters in aggregate function

From: Scara Maccai <m_lists(at)yahoo(dot)it>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: multiple paramters in aggregate function
Date: 2009-08-13 13:06:19
Message-ID: 323963.55863.qm@web24605.mail.ird.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> That could work in some cases, however in our case it would
> not produce
> desirable results.

Well I don't think you got Alban's suggestion right...
What he was trying to say was:

- use a regular (not aggregated) function to convert all measures to mm
- use the normal SUM() to sum those value
- use another regular function to convert from mm to whatever

select mm_to_m(sum(convert_to_mm(measure))) from a

Which is easier than my solution.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2009-08-13 14:16:40 Re: totally different plan when using partitions
Previous Message mito 2009-08-13 13:02:14 Selecting rows by content of array type field