pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ron <ronljohnsonjr@gmail.com>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Converting row elements into a arrays?
Date: Thu, 2 Mar 2023 15:46:51 -0600
Message-ID: <cada9253-607a-498b-9a59-b61dd7717784@gmail.com> (raw)
In-Reply-To: <CAKFQuwa_FxvNXqLdYgg9ctTJ675Zp7e2nOCMkPCrYfKbwsDoDg@mail.gmail.com>
References: <788ab733-d0d1-7791-fb22-7c2724b08816@gmail.com>
	<CAKFQuwa_FxvNXqLdYgg9ctTJ675Zp7e2nOCMkPCrYfKbwsDoDg@mail.gmail.com>

On 3/2/23 15:34, David G. Johnston wrote:
> On Thu, Mar 2, 2023 at 1:58 PM Ron <ronljohnsonjr@gmail.com> wrote:
>
>     Postgresql 12.13
>
>     Given the sample below, I'm looking for how to generate this output. 
>     It's
>     like GROUP BY, but generating an array instead of an aggreate number.
>
>
> Group By creates groups, that's it.  How you aggregate the data that are 
> in those groups is determined by which function you call.  Sure, a 
> function like "count()" produces a single number, but there are other 
> functions.  Even a whole documentation section listing them.
>
> https://www.postgresql.org/docs/current/functions-aggregate.html
>
> David J.
>

I'm used to the bog standard COUNT, AVG, MIN, MAX, SUM. It didn't occur to 
me that there would be others...

-- 
Born in Arizona, moved to Babylonia.

view thread (11+ messages)  latest in thread

Message-ID: <cada9253-607a-498b-9a59-b61dd7717784@gmail.com>
Permalink:  ../cada9253-607a-498b-9a59-b61dd7717784@gmail.com/
Also on:    postgresql.org/message-id/cada9253-607a-498b-9a59-b61dd7717784@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: ronljohnsonjr@gmail.com, david.g.johnston@gmail.com
  Subject: Re: Converting row elements into a arrays?
  In-Reply-To: <cada9253-607a-498b-9a59-b61dd7717784@gmail.com>
  References: <788ab733-d0d1-7791-fb22-7c2724b08816@gmail.com> <CAKFQuwa_FxvNXqLdYgg9ctTJ675Zp7e2nOCMkPCrYfKbwsDoDg@mail.gmail.com> <cada9253-607a-498b-9a59-b61dd7717784@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox