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

From Francisco Olarte
Subject Re: SQL help - multiple aggregates
Date
Msg-id CA+bJJbzhkRSc22Y7qrwBojiesMfiaDzE6OyhY_CqYK7+11mKwA@mail.gmail.com
Whole thread Raw
In response to Re: SQL help - multiple aggregates  (Francisco Olarte <folarte@peoplecall.com>)
List pgsql-general
CCing to the list ( if you are new to this list, messages come from
the sender address, you have to use "reply all" ( at least in my MUA,
web gmail ) to make your replies appear in the list ).

On Thu, Aug 18, 2016 at 3:03 PM,  <hamann.w@t-online.de> wrote:
> Hi Francisco,
> thanks a lot. I will give it a try later

Do it, and do not forget to try the straightforward solution ( sume of
cases ) given by Ladislav Lenart above.I normally prefer to do this
kind of things the way I pointed you because the queries are simpler
and normally only the first one takes time, and using count tends to
be the faster way to extract the relevant data ( the rest of my query,
after the first with, is just moving data around for pretty-printing (
or pretty-selecting ).

Francisco Olarte.


pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: SQL help - multiple aggregates
Next
From: Francisco Olarte
Date:
Subject: Re: Sequential vs. random values - number of pages in B-tree