Re: SQL help - multiple aggregates - Mailing list pgsql-general

From David G. Johnston
Subject Re: SQL help - multiple aggregates
Date
Msg-id CAKFQuwZ-+MzeaPb-EUfAa7OJY+noxyoESSP+XUgwf666ChPM7Q@mail.gmail.com
Whole thread Raw
In response to SQL help - multiple aggregates  (hamann.w@t-online.de)
List pgsql-general
On Thu, Aug 18, 2016 at 4:56 AM, <hamann.w@t-online.de> wrote:
select custid, count(vendid) as c415 from cv where vendid = 415 group by custid
​[...]

Is there a better way (by creating an aggregate function, perhaps)

​You may find crosstab in the tablefuncs extension to be of use.


​David J.​

pgsql-general by date:

Previous
From: Ladislav Lenart
Date:
Subject: Re: SQL help - multiple aggregates
Next
From: Francisco Olarte
Date:
Subject: Re: SQL help - multiple aggregates