Define Aggregate Function And Structure