結果 : how to create aggregate function in postgresql