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.