SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
create table test(id int, some_column jsonb); insert into test(id, some_column) values (1, '[{"name": "1_1"}, {"name": "1_2"}]'), (2, '[{"name": "2_1"}, {"name": "2_2"}]'); select json_agg(jsonb_path_query(some_column, '$.name[*]')) from test;

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear