Postgres Aggregate Into Arraylist Sort C