Re: How to return a jsonb list of lists (with integers)

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 <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to return a jsonb list of lists (with integers)
Date: 2021-02-16 21:02:04
Message-ID: CAKFQuwYgHf=fUbQ-js1Xk5h=E7v_FSwuVyG+eD_JAp=mcPsqaQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tuesday, February 16, 2021, Alexander Farber <alexander(dot)farber(at)gmail(dot)com>
wrote:
>
> But is it possible in SQL to combine all 3 queries, so that a JSONB list
> of lists is returned?
> So I have to use PL/PgSQL, correct?
>

With liberal usage of CTEs and subqueries writing a single SQL query should
be doable.

David J.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron 2021-02-16 22:11:02 Re: Order by not working
Previous Message Alexander Farber 2021-02-16 20:55:28 Re: How to return a jsonb list of lists (with integers)