Re: I probably don't understand aggregates.

From: David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: I probably don't understand aggregates.
Date: 2014-06-11 22:34:02
Message-ID: CAKFQuwZJDDXmaDNzH5VuDS5+nmkPxTgZfXO60K5jW25yqdLEug@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

>
>
> But how can I get my wrapper function to evaluate the aggregate on the
> whole table and work with the result afterwards?
>
> Or do I need to change the aggregate?
>
>
​I do not follow but...

SELECT myWrapper(agg_output) FROM (
SELECT myAgg(x) AS agg_output FROM test
)​ agg_subquery;

It is not clear why you need both an aggregate and a wrapper...

David J.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/I-probably-don-t-understand-aggregates-tp5806879p5806900.html
Sent from the PostgreSQL - novice mailing list archive at Nabble.com.

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Markus Neumann 2014-06-11 22:48:29 Re: I probably don't understand aggregates.
Previous Message Markus Neumann 2014-06-11 22:23:40 Re: I probably don't understand aggregates.