I have multiple column to aggregate in one new column .I wanna Concatenate them in one array and separator with ',' between them.Can you tell me some advances to write query .My example i want work simple and faster :
SELECT array_agg('[' || us.name || ',' || us.age || ',' || us.gender || ']')
FROM users as us;