Re: JSONB_AGG: aggregate function calls cannot be nested

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Alexander Farber <alexander(dot)farber(at)gmail(dot)com>
Cc: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: JSONB_AGG: aggregate function calls cannot be nested
Date: 2021-02-22 14:17:42
Message-ID: CAKFQuwbXJJOpJi01WACOG35GvtFbKqMFQTYnD12iptk=tMVNCg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Monday, February 22, 2021, Alexander Farber <alexander(dot)farber(at)gmail(dot)com>
wrote:

>
>
> but how to get a JSON map of lists here? I am trying:
>
> {
> "day": [ "2021-02-08", "2021-02-09", ... ],
> "completed": [ 475, 770, ...],
> "expired": [ 155, 263 , ...]
> }
>

If you want the days aggregated then don’t “group by day”

David J.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Luca Ferrari 2021-02-22 14:42:38 cannot promote after recovery for PITR
Previous Message Alexander Farber 2021-02-22 14:03:00 Re: JSONB_AGG: aggregate function calls cannot be nested