Ratings query fully implemented