結果 : aggregate function for date in sql