Class AggregateFunctions

java.lang.Object
io.github.torand.fastersql.function.aggregate.AggregateFunctions

public final class AggregateFunctions extends Object
Provides factory methods for aggregate functions.
  • Method Details

    • max

      public static Max max(Expression expression)
      Creates the maximum aggregate of an expression.
      Parameters:
      expression - the expression.
      Returns:
      the aggregate function.
    • min

      public static Min min(Expression expression)
      Creates the minimum aggregate of an expression.
      Parameters:
      expression - the expression.
      Returns:
      the aggregate function.
    • count

      public static Count count(Expression expression)
      Creates the count aggregate of an expression.
      Parameters:
      expression - the expression.
      Returns:
      the aggregate function.
    • count

      public static CountAll count()
      Creates the count aggregate of all rows.
      Returns:
      the aggregate function.
    • sum

      public static Sum sum(Expression expression)
      Creates the sum aggregate of an expression.
      Parameters:
      expression - the expression.
      Returns:
      the aggregate function.
    • avg

      public static Avg avg(Expression expression)
      Creates the average aggregate of an expression.
      Parameters:
      expression - the expression.
      Returns:
      the aggregate function.