I have a query with 3 columns and multiple rows. I need to store the query result into an array of a composite type. Can someone help how to achieve it using array_agg or a diff