結果 : aggregate function in case when sql