add aggregate function to validation for Trigger Rules