Hi Ivan,
On Mon, Jan 1, 2018 at 3:34 PM, Ivan E. Panchenko <i.panchenko@xxxxxxxxxxxxxx> wrote:
select json_object_agg(gid, y) from
(
select gid, jsonb_agg(row_to_json(chat)) y
from chat
group by gid
) x;
01.01.2018 16:41, Alexander Farber пишет:
I have prepared a simple SQL Fiddle demonstrating my problem: http://sqlfiddle.com/#!17/2c9c5/1
that is great, thank you!