fixed syntax error in aggregate data