Postgresql – Add LIMIT or ORDER BY inside json_arrayagg()
I have tables level_one_table, level_two_table, and level_three_table. level_one_table to level_two_table: one to multiple rows level_two_table to level_three_table: one to one row Goal: select them all and level_two_table rows able to use LIMIT and ORDER BY. Return data structure like below:…