//总和
CGFloat all_value = [[ary valueForKeyPath:@"@sum.floatValue"] floatValue];
平均数
CGFloat mid_value = [[ary valueForKeyPath:@"@avg.floatValue"] floatValue];
最大值
CGFloat max_value = [[ary valueForKeyPath:@"@max.floatValue"] floatValue];
最小值 CGFloat min_value = [[ary valueForKeyPath:@"@min.floatValue"] floatValue];
网友评论