Aggregate Functions

Aggregate functions perform operations across columns.

CRM Analytics supports the following aggregate functions.

  • avg()

    Takes the average of row values in a given column.

  • count()

    Returns the number of rows that match a specified condition in a column.

  • min()

    Returns the lowest row value in a numeric column.

  • max()

    Returns the highest row value in a numeric column.

  • sum()

    Returns the sum of all rows values in a numeric column.

  • stddev_pop()

    Returns the population standard deviation of the values in a field. Accepts measure fields as input. This function does not accept expressions.

  • stddev_samp()

    Returns the standard deviation of values in a field. Accepts measure fields as input. This function does not accept expressions.

  • var_pop()

    Returns the population variance of the values in a field. Accepts measure fields as input. This function does not accept expressions.

  • var_samp()

    Returns the sample variance of the values in a field. Accepts measure fields as input. This function does not accept expressions.

  • regr_intercept()

    Returns the y-intercept value of a regression line.

  • regr_slope()

    Returns the slope of a regression line between two numerical fields.

  • regr_r2()

    Returns the R-squared, or goodness-of-fit value for a regression.

  • percentile_cont

    Calculates a percentile based on a continuous distribution of the column value.

  • percentile_disc

    Returns the value corresponding to a given percentile. Accepts measure fields as input.