Added aggregate functions for ratings