private string GetAggregateName(Grouping.AggregateMethod method) { switch (method) { case Grouping.AggregateMethod.Count: return("COUNT"); case Grouping.AggregateMethod.Sum: return("SUM"); case Grouping.AggregateMethod.Average: return("AVG"); case Grouping.AggregateMethod.Maximum: return("MAX"); case Grouping.AggregateMethod.Minimum: return("MIN"); case Grouping.AggregateMethod.Deviation: return("STDEV"); case Grouping.AggregateMethod.DeviationPopulation: return("STDEVP"); case Grouping.AggregateMethod.Variance: return("VAR"); case Grouping.AggregateMethod.VariancePopulation: return("VARP"); default: throw new NotSupportedException($"Invalid '{method}' aggregate method."); } }
public AggregateExpression(Grouping.AggregateMethod method, params IExpression[] arguments) : base(method.ToString(), MethodType.Function, arguments) { this.Method = method; }